login
a(n) = (2*n-1)*(n^2 -n +2)/2.
21

%I #31 Sep 08 2022 08:45:03

%S 1,6,20,49,99,176,286,435,629,874,1176,1541,1975,2484,3074,3751,4521,

%T 5390,6364,7449,8651,9976,11430,13019,14749,16626,18656,20845,23199,

%U 25724,28426,31311,34385,37654,41124,44801,48691,52800,57134

%N a(n) = (2*n-1)*(n^2 -n +2)/2.

%C Sum of two consecutive terms of A006003(n) = n*(n^2+1)/2. a(n) = A006003(n-1) + A006003(n). - _Alexander Adamchuk_, Jun 03 2006

%C If a 2-set Y and a 3-set Z are disjoint subsets of an n-set X then a(n-4) is the number of 5-subsets of X intersecting both Y and Z. - _Milan Janjic_, Sep 08 2007

%H Harry J. Smith, <a href= "/A063488/b063488.txt" >Table of n, a(n) for n = 1..1000</a>

%H Milan Janjic, <a href= "http://www.pmfbl.org/janjic/" >Two Enumerative Functions</a>

%H M. Janjic and B. Petkovic, <a href= "http://arxiv.org/abs/1301.4550" >A Counting Function</a>, arXiv 1301.4550 [math.CO], 2013.

%H T. P. Martin, <a href= "http://dx.doi.org/10.1016/0370-1573(95)00083-6" >Shells of atoms</a>, Phys. Rep., 273 (1996), 199-241, eq. (10).

%H <a href= "/index/Rec#order_04" >Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F G.f.: (1 + x)*(1 + x + x^2)/(1 - x)^4. - _Jaume Oliver Lafont_, Aug 30 2009

%F a(n) = A000217(A000217(n)) - A000217(A000217(n-2)). - _Bruno Berselli_, Oct 14 2016

%F E.g.f.: (-2 + 4*x + 3*x^2 + 2*x^3)*exp(x)/2 + 1. - _G. C. Greubel_, Dec 01 2017

%t Table[(2 n - 1) (n^2 - n + 2)/2, {n, 1, 40}] (* _Bruno Berselli_, Oct 14 2016 *)

%t LinearRecurence[{4,-6,4,-1}, {1,6,20,49}, 50] (* _G. C. Greubel_, Dec 01 2017 *)

%o (PARI) { for (n=1, 1000, write( "b063488.txt", n, "", (2*n - 1)*(n^2 - n + 2)/2) ) } \\ _Harry J. Smith_, Aug 23 2009

%o (PARI) x='x+O('x^30); Vec(serlaplace((-2 + 4*x + 3*x^2 + 2*x^3)*exp(x)/2 + 1)) \\ _G. C. Greubel_, Dec 01 2017

%o (Magma) [(2*n-1)*(n^2 -n +2)/2: n in [1..30]]; // _G. C. Greubel_, Dec 01 2017

%Y 1/12*t*n*(2*n^2 - 3*n + 1) + 2*n - 1 for t = 2, 4, 6,... gives A049480, A005894, A063488, A001845, A063489, A005898, A063490, A057813, A063491, A005902, A063492, A005917, A063493, A063494, A063495, A063496.

%Y Cf. A000217, A006003.

%Y Partial sums of A005918.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Aug 01 2001