%I #15 Jan 02 2024 09:00:06
%S 1,17,18,274,275,1571,1572,5668,5669,15669,15670,36406,36407,74823,
%T 74824,140360,140361,245337,245338,405338,405339,639595,639596,971372,
%U 971373,1428349,1428350,2043006,2043007,2853007,2853008,3901584,3901585
%N a(1)=1, a(n)=a(n-1)+n^0 if n odd, a(n)=a(n-1)+ n^4 if n is even.
%H Harvey P. Dale, <a href="/A140142/b140142.txt">Table of n, a(n) for n = 1..1000</a>
%F O.g.f.: x*(x^8+16*x^7-4*x^6+176*x^5+6*x^4+176*x^3-4*x^2+16*x+1)/((-1+x)^6*(1+x)^5) - _R. J. Mathar_, May 17 2008
%p a:= n-> (Matrix([[275,274,18,17, 1,0,0,-1,-17, -18,-274]]). Matrix(11, (i,j)-> if (i=j-1) then 1 elif j=1 then [1,5,-5,-10,10,10, -10,-5,5,1,-1][i] else 0 fi)^n)[1,6]: seq(a(n), n=1..33); # _Alois P. Heinz_, Aug 06 2008
%t a = {}; r = 0; s = 4; Do[k = 0; Do[k = k + (Sin[Pi m/2]^2) m^r + (Cos[Pi m/2]^2) m^s, {m, 1, n}]; AppendTo[a, k], {n, 1, 100}]; a (* _Artur Jasinski_ *)
%t nxt[{n_,a_}]:={n+1,If[OddQ[n+1],a+1,a+(n+1)^4]}; Transpose[ NestList[ nxt,{1,1},40]][[2]] (* _Harvey P. Dale_, Dec 24 2012 *)
%Y Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113.
%K nonn
%O 1,2
%A _Artur Jasinski_, May 12 2008