login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140150 a(1)=1, a(n)=a(n-1)+n^2 if n odd, a(n)=a(n-1)+ n^4 if n is even. 1

%I #12 Jan 02 2024 09:01:26

%S 1,17,26,282,307,1603,1652,5748,5829,15829,15950,36686,36855,75271,

%T 75496,141032,141321,246297,246658,406658,407099,641355,641884,973660,

%U 974285,1431261,1431990,2046646,2047487,2857487,2858448,3907024,3908113

%N a(1)=1, a(n)=a(n-1)+n^2 if n odd, a(n)=a(n-1)+ n^4 if n is even.

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

%F G.f.: x*(1+16*x+4*x^2+176*x^3-10*x^4+176*x^5+4*x^6+16*x^7+x^8)/((1+x)^5*(x-1)^6). [From _R. J. Mathar_, Feb 22 2009]

%t a = {}; r = 2; 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[EvenQ[n],a+(n+1)^2,a+(n+1)^4]}; NestList[nxt,{1,1},40][[All,2]] (* or *) LinearRecurrence[{1,5,-5,-10,10,10,-10,-5,5,1,-1},{1,17,26,282,307,1603,1652,5748,5829,15829,15950},40] (* _Harvey P. Dale_, Aug 28 2017 *)

%Y Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113.

%K nonn

%O 1,2

%A _Artur Jasinski_, May 12 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)