login
a(n) = (2*n - 1)*(11*n^2 - 11*n + 6)/6.
18

%I #40 Sep 08 2022 08:45:04

%S 1,14,60,161,339,616,1014,1555,2261,3154,4256,5589,7175,9036,11194,

%T 13671,16489,19670,23236,27209,31611,36464,41790,47611,53949,60826,

%U 68264,76285,84911,94164,104066,114639,125905,137886,150604,164081,178339,193400,209286,226019

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

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

%H T. P. Martin, <a href="http://dx.doi.org/10.1016/0370-1573(95)00083-6">Shells of atoms</a>, Phys. Reports, 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.: x*(1+x)*(1 + 9*x + x^2)/(1-x)^4. - _Colin Barker_, Apr 24 2012

%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4. - _Wesley Ivan Hurt_, Dec 16 2015

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

%p A063492:=n->(2*n - 1)*(11*n^2 - 11*n + 6)/6: seq(A063492(n), n=1..50); # _Wesley Ivan Hurt_, Dec 16 2015

%t Table[(2*n-1)*(11*n^2-11*n+6)/6, {n, 5!}] (* _Vladimir Joseph Stephan Orlovsky_, Sep 18 2008 *)

%t LinearRecurrence[{4, -6, 4, -1}, {1, 14, 60, 161}, 40] (* _Vincenzo Librandi_, Dec 16 2015 *)

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

%o (PARI) Vec(x*(1+x)*(1+9*x+x^2)/(1-x)^4 + O(x^100)) \\ _Altug Alkan_, Dec 16 2015

%o (Python)

%o A063492_list, m = [], [22, -11, 2, 1]

%o for _ in range(10**2):

%o A063492_list.append(m[-1])

%o for i in range(3):

%o m[i+1] += m[i] # _Chai Wah Wu_, Dec 15 2015

%o (Magma) [(2*n-1)*(11*n^2-11*n+6)/6: n in [1..40]]; // _Vincenzo Librandi_, Dec 16 2015

%Y 1/12*t*(2*n^3 - 3*n^2 + n) + 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.

%K nonn,easy

%O 1,2

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