A062393 a(n) = n^5 - (n-1)^5 + (n-2)^5 - ... +(-1)^n*0^5.
0, 1, 31, 212, 812, 2313, 5463, 11344, 21424, 37625, 62375, 98676, 150156, 221137, 316687, 442688, 605888, 813969, 1075599, 1400500, 1799500, 2284601, 2869031, 3567312, 4395312, 5370313, 6511063, 7837844, 9372524, 11138625, 13161375
Offset: 0
Links
- Harry J. Smith, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-9,5,5,-9,5,-1).
Programs
-
Maple
a := n -> (1-(-1)^n+n^2*(n^2*(2*n+5)-5))/4; # Peter Luschny, Jul 12 2009
-
Mathematica
k=0;lst={k};Do[k=n^5-k;AppendTo[lst, k], {n, 1, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *) Table[Total[(Times@@@Partition[Riffle[Range[n,0,-1],{1,-1},{2,-1,2}],2])^5],{n,0,30}] (* or *) LinearRecurrence[ {5,-9,5,5,-9,5,-1},{0,1,31,212,812,2313,5463},40] (* Harvey P. Dale, Feb 01 2013 *)
-
PARI
{ a=0; for (n=0, 1000, write("b062393.txt", n, " ", a=n^5 - a) ) } \\ Harry J. Smith, Aug 07 2009
Formula
a(n) = (2*n^5 + 5*n^4 - 5*n^2 + 1 - (-1)^n)/4 = n^5 - a(n-1).
G.f.: x*(x^4 + 26*x^3 + 66*x^2 + 26*x + 1)/((x-1)^6*(x+1)). - Colin Barker, Sep 19 2012
a(0)=0, a(1)=1, a(2)=31, a(3)=212, a(4)=812, a(5)=2313, a(6)=5463, a(n) = 5*a(n-1) - 9*a(n-2) + 5*a(n-3) + 5*a(n-4) - 9*a(n-5) + 5*a(n-6) - a(n-7). - Harvey P. Dale, Feb 01 2013
Comments