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

%I #28 Sep 13 2024 08:01:33

%S 0,1,12,57,176,425,876,1617,2752,4401,6700,9801,13872,19097,25676,

%T 33825,43776,55777,70092,87001,106800,129801,156332,186737,221376,

%U 260625,304876,354537,410032,471801,540300,616001,699392,790977,891276,1000825,1120176

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

%D T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

%H Vincenzo Librandi, <a href="/A071270/b071270.txt">Table of n, a(n) for n = 0..2000</a>

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

%F a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), with n>4, a(0)=0, a(1)=1, a(2)=12, a(3)=57, a(4)=176. - _Yosu Yurramendi_, Sep 03 2013

%F a(n) = A000217(A001105(n))/ 3. - _Michel Marcus_, Mar 02 2018

%F From _G. C. Greubel_, Sep 13 2024: (Start)

%F G.f.: x*(1 + 7*x + 7*x^2 + x^3)/(1-x)^5.

%F E.g.f.: (1/3)*x*(3 + 15*x + 12*x^2 + 2*x^3)*exp(x). (End)

%p A071270:=n->(n^2)*(2*n^2+1)/3; seq(A071270(n), n=0..100); # _Wesley Ivan Hurt_, Nov 14 2013

%t Table[(n^2)(2n^2+1)/3, {n,0,100}] (* _Wesley Ivan Hurt_, Nov 14 2013 *)

%t LinearRecurrence[{5,-10,10,-5,1},{0,1,12,57,176},50] (* _Harvey P. Dale_, Jan 09 2016 *)

%o (Magma) [n^2*(2*n^2+1)/3: n in [0..40]]; // _Vincenzo Librandi_, Jun 14 2011

%o (R)

%o a <- c(0, 1, 12, 57, 176)

%o for(n in (length(a)+1):30)

%o a[n] <- 5*a[n-1]-10*a[n-2]+10*a[n-3]-5*a[n-4]+a[n-5]

%o a # _Yosu Yurramendi_, Sep 03 2013

%o (SageMath)

%o def A071270(n): return binomial(2*n^2 + 1,2)/3

%o [A071270(n) for n in range(41)] # _G. C. Greubel_, Sep 13 2024

%Y Cf. A000217, A001105, A071238.

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, Jun 12 2002