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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A135276 a(0)=0, a(1)=1; for n>1, a(n) = a(n-1) + n^0 if n odd, a(n) = a(n-1) + n^1 if n is even. 4
 0, 1, 3, 4, 8, 9, 15, 16, 24, 25, 35, 36, 48, 49, 63, 64, 80, 81, 99, 100, 120, 121, 143, 144, 168, 169, 195, 196, 224, 225, 255, 256, 288, 289, 323, 324, 360, 361, 399, 400, 440, 441, 483, 484, 528, 529, 575, 576, 624, 625, 675, 676, 728, 729, 783, 784, 840, 841, 899, 900, 960, 961 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Index to family of sequences of the form a(n) = a(n-1) + n^r if n odd, a(n) = a(n-1)+ n^s if n is even, for n > 1 and a(1)=1: r=0, s=0: A000027; r=0, s=1: this entry; r=0, s=2: A135301; r=0, s=3: A135332; r=0, s=4: A140142; r=0, s=5: A140143; r=1, s=0: A140144; r=1, s=1: A000217; r=1, s=2: A140113; r=1, s=3: A140145; r=1, s=4: A140146; r=1, s=5: A140147; r=2, s=0: A140148; r=2, s=1: A136047; r=2, s=2: A000330; r=2, s=3: A140149; r=2, s=4: A140150; r=2, s=5: A140151; r=3, s=0: A140152; r=3, s=1: A140153; r=3, s=2: A140154; r=3, s=3: A000537; r=3, s=4: A140155; r=3, s=5: A140156; r=4, s=0: A140157; r=4, s=1: A140158; r=4, s=2: A140159; r=4, s=3: A140160; r=4, s=4: A000538; r=4, s=5: A140161; r=5, s=0: A140162; r=5, s=1: A140163; r=5, s=2: A135095; r=5, s=3: A135099; r=5, s=4: A135214; r=5, s=5: A000539. Equals triangle A070909 * [1,2,3,...]. - Gary W. Adamson, May 16 2010 Right edge of the triangle in A199332: a(n) = A199332(n,n), for n > 0. - Reinhard Zumkeller, Nov 23 2011 LINKS G. C. Greubel, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1). FORMULA a(n) = (n/2 + 1)^2 - 1 if n is even, ((n+1)/2)^2 if n is odd. - M. F. Hasler, May 17 2008 From R. J. Mathar, Feb 22 2009: (Start) G.f.: x*(1+2*x-x^2)/((1+x)^2*(1-x)^3). a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End) a(n) = (2*n^2 + 6*n + 1 + (2*n-1)*(-1)^n)/8. - Luce ETIENNE, Jul 08 2014 a(n) = (floor(n/2)+1)^2 + (n mod 2) - 1. - Wesley Ivan Hurt, Mar 22 2016 a(n) = A004526((n+1)^2) - A004526(n+1)^2. - Bruno Berselli, Oct 21 2016 Sum_{n>=1} 1/a(n) = 3/4 + Pi^2/6. - Amiram Eldar, Sep 08 2022 MAPLE A135276:=n->( 2*n^2 + 6*n + 1 + (2*n-1)*(-1)^n )/8: seq(A135276(n), n=0..100); # Wesley Ivan Hurt, Mar 22 2016 MATHEMATICA a = {}; r = 0; s = 1; 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, 0, 100}]; a (* Artur Jasinski *) LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 3, 4, 8}, 50] (* G. C. Greubel, Oct 08 2016 *) PROG (PARI) A135276(n)=if(n%2, ((n+1)/2)^2, (n/2+1)^2-1) # M. F. Hasler, May 17 2008 (PARI) my(x='x+O('x^200)); concat(0, Vec(x*(1+2*x-x^2)/((1+x)^2*(1-x)^3))) \\ Altug Alkan, Mar 23 2016 (Magma) [(2*n^2+6*n+1+(2*n-1)*(-1)^n)/8 : n in [0..100]]; // Wesley Ivan Hurt, Mar 22 2016 CROSSREFS Cf. A000027, A000217, A000330, A000537, A000538, A000539, A004526, A136047, A140113. Cf. A070909. - Gary W. Adamson, May 16 2010 Sequence in context: A177986 A186775 A285440 * A058074 A319875 A123722 Adjacent sequences: A135273 A135274 A135275 * A135277 A135278 A135279 KEYWORD nonn,easy AUTHOR Artur Jasinski, May 12 2008, corrected May 17 2008 EXTENSIONS Offset corrected by R. J. Mathar, Feb 22 2009 STATUS approved

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.

Last modified December 9 13:46 EST 2022. Contains 358700 sequences. (Running on oeis4.)