login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A140144
a(1)=1, a(n)=a(n-1)+n^1 if n odd, a(n)=a(n-1)+ n^0 if n is even.
3
1, 2, 5, 6, 11, 12, 19, 20, 29, 30, 41, 42, 55, 56, 71, 72, 89, 90, 109, 110, 131, 132, 155, 156, 181, 182, 209, 210, 239, 240, 271, 272, 305, 306, 341, 342, 379, 380, 419, 420, 461, 462, 505, 506, 551, 552, 599, 600, 649, 650, 701, 702, 755, 756, 811, 812, 869
OFFSET
1,2
COMMENTS
Equals triangle A177990 * [1,2,3,...]. - Gary W. Adamson, May 16 2010
FORMULA
From R. J. Mathar, Feb 22 2009: (Start)
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
G.f.: x*(-1-x-x^2+x^3)/ ((1+x)^2*(x-1)^3). (End)
a(n) = Sum_{k=1..n} k^(k mod 2). - Wesley Ivan Hurt, Nov 20 2021
MATHEMATICA
a = {}; r = 1; s = 0; 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
CROSSREFS
Cf. A177990. - Gary W. Adamson, May 16 2010
Cf. A002378 (even bisection), A028387 (odd bisection).
Sequence in context: A057812 A329572 A329569 * A328893 A030130 A164874
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, May 12 2008
STATUS
approved