login
n followed by n^2 followed by n^3 followed by n^4.
2

%I #15 Dec 02 2015 11:37:27

%S 1,1,1,1,2,4,8,16,3,9,27,81,4,16,64,256,5,25,125,625,6,36,216,1296,7,

%T 49,343,2401,8,64,512,4096,9,81,729,6561,10,100,1000,10000,11,121,

%U 1331,14641,12,144,1728,20736,13,169,2197,28561,14,196,2744,38416,15,225

%N n followed by n^2 followed by n^3 followed by n^4.

%H Colin Barker, <a href="/A110001/b110001.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n) = (3/8 + n/4 - (1/4)*cos((Pi*n)/2) - (1/8)*cos(Pi*n) + (1/4)*sin((Pi*n)/2))^(((n + 3) mod 4) + 1). - _Ilya Gutkovskiy_, Dec 02 2015

%F From _Colin Barker_, Dec 02 2015: (Start)

%F a(n) = 5*a(n-4)-10*a(n-8)+10*a(n-12)-5*a(n-16)+a(n-20) for n>20.

%F G.f.: x*(1+x+x^2+x^3-3*x^4-x^5+3*x^6+11*x^7+3*x^8-x^9-3*x^10+11*x^11-x^12+x^13-x^14+x^15) / ((1-x)^5*(1+x)^5*(1+x^2)^5).

%F (End)

%p seq(seq(n^k, k=1..4), n=1..15); # _Zerinvary Lajos_, Jun 29 2007

%t Table[(3/8 + n/4 - (1/4) Cos[(Pi n)/2] - (1/8) Cos[Pi n] + (1/4) Sin[(Pi n)/2])^(Mod[n + 3, 4] + 1), {n, 1, 58}] (* _Ilya Gutkovskiy_, Dec 02 2015 *)

%o (PARI) Vec(x*(1+x+x^2+x^3-3*x^4-x^5+3*x^6+11*x^7+3*x^8-x^9-3*x^10+11*x^11-x^12+x^13-x^14+x^15) / ((1-x)^5*(1+x)^5*(1+x^2)^5) + O(x^100)) \\ _Colin Barker_, Dec 02 2015

%Y Cf. A000463, A109588, A109594.

%K nonn,easy,tabf

%O 1,5

%A _Mohammad K. Azarian_, Sep 02 2005