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!)
A135095 a(1)=1, a(n) = a(n-1) + n^5 if n odd, a(n) = a(n-1) + n^2 if n is even. 2

%I #17 Jan 02 2024 08:56:53

%S 1,5,248,264,3389,3425,20232,20296,79345,79445,240496,240640,611933,

%T 612129,1371504,1371760,2791617,2791941,5268040,5268440,9352541,

%U 9353025,15789368,15789944,25555569,25556245,39905152,39905936,60417085

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

%H G. C. Greubel, <a href="/A135095/b135095.txt">Table of n, a(n) for n = 1..1000</a>

%F G.f.: -x*(x^8 - 4*x^7 + 236*x^6 + 12*x^5 + 1446*x^4 - 12*x^3 + 236*x^2 + 4*x + 1)*(x^2 + 1)/( (1+x)^6 * (x-1)^7 ). - _R. J. Mathar_, Feb 22 2009

%F E.g.f.: (1/24)*( (-3 - 6*x - 17*x^2 + 240*x^3 - 75*x^4 + 6*x^5)*exp(x) + (3 + 24*x + 204*x^2 + 364*x^3 + 195*x^4 + 36*x^5 + 2*x^6)*exp(x) ). - _G. C. Greubel_, Sep 23 2016

%t a = {}; r = 5; s = 2; 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 Table[(1/24)*(3 + 2*n + 5*n^2 + 4*n^3 + 5*n^4 + 6*n^5 + 2*n^6 - 3*(-1)^n*(1 + n* (-2 - 7*n + 5*n^3 + 2*n^4))), {n,1,50}] (* _G. C. Greubel_, Sep 23 2016 *)

%o (PARI) for(n=1,50, print1((1/24)*(3 + 2*n + 5*n^2 + 4*n^3 + 5*n^4 + 6*n^5 + 2*n^6 - 3*(-1)^n*(1 + n* (-2 - 7*n + 5*n^3 + 2*n^4))), ", ")) \\ _G. C. Greubel_, Jul 05 2018

%o (Magma) [(1/24)*(3 + 2*n + 5*n^2 + 4*n^3 + 5*n^4 + 6*n^5 + 2*n^6 - 3*(-1)^n*(1 + n* (-2 - 7*n + 5*n^3 + 2*n^4))): n in [1..50]]; // _G. C. Greubel_, Jul 05 2018

%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 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)