%I #13 May 26 2018 14:13:41
%S 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,
%T 729,9,100,1000,10,121,1331,11,144,1728,12,169,2197,13,196,2744,14,
%U 225,3375,15,256,4096,16,289,4913,17,324,5832,18,361,6859,19,400,8000,20
%N n^2 followed by n^3 followed by n.
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,4,0,0,-6,0,0,4,0,0,-1).
%F 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
%F a(n) = floor((n+2)/3)^((n mod 3)+1). - _Luce ETIENNE_, Mar 01 2018
%t 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 *)
%Y Cf. A000463.
%Y Cf. A010872.
%K nonn,easy
%O 1,4
%A _Mohammad K. Azarian_, Aug 30 2005