A109815 n^2 followed by n^3 followed by n.
1, 1, 1, 4, 8, 2, 9, 27, 3, 16, 64, 4, 25, 125, 5, 36, 216, 6, 49, 343, 7, 64, 512, 8, 81, 729, 9, 100, 1000, 10, 121, 1331, 11, 144, 1728, 12, 169, 2197, 13, 196, 2744, 14, 225, 3375, 15, 256, 4096, 16, 289, 4913, 17, 324, 5832, 18, 361, 6859, 19, 400, 8000, 20
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,4,0,0,-6,0,0,4,0,0,-1).
Programs
-
Mathematica
Table[{n^2,n^3,n},{n,20}]//Flatten (* or *) LinearRecurrence[{0,0,4,0,0,-6,0,0,4,0,0,-1},{1,1,1,4,8,2,9,27,3,16,64,4},60] (* Harvey P. Dale, May 26 2018 *)
Formula
G.f.: x*(1+x+x^2+4*x^4-2*x^5-x^6+x^7+x^8) / ( (x-1)^4*(1+x+x^2)^4 ). - R. J. Mathar, Mar 03 2014
a(n) = floor((n+2)/3)^((n mod 3)+1). - Luce ETIENNE, Mar 01 2018
Comments