login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A136047 a(1)=1, a(n)=a(n-1)+n if n even, a(n)=a(n-1)+ n^2 if n is odd. 31
1, 3, 12, 16, 41, 47, 96, 104, 185, 195, 316, 328, 497, 511, 736, 752, 1041, 1059, 1420, 1440, 1881, 1903, 2432, 2456, 3081, 3107, 3836, 3864, 4705, 4735, 5696, 5728, 6817, 6851, 8076, 8112, 9481, 9519, 11040, 11080, 12761, 12803, 14652, 14696, 16721 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The only prime terms are 3, 41, 47. The semiprime terms are A136048: 185 = 5*37, 497 = 7*71, 511 = 7*73, 1041 = 3*347, 1059 = 3*353, 1903 = 11*173, 3107 = 13*239, 4705 = 5*941, 4735 = 5*947, 6817 = 17*401, 9481 = 19*499, 12761 = 7*1823, 16721 = 23*727, 33379 = 29*1151, 48961 = 11*4451, 49027 = 11*4457, 68857 = 37*1861, 80561 = 13*6197, 80639 = 13*6203, 93521 = 41*2281. Cf. A001082/A135370: a(1) = 1, then if n even/odd a(n) = n+a(n-1), if n odd/even a(n) = 2*n+a(n-1).

LINKS

Table of n, a(n) for n=1..45.

Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).

FORMULA

a(n)=(1/12)(1 + n)(2n^2+7n-3) if n is odd, a(n)=(1/12)n(2n^2+3n+4) if n is even; a(n)=(-3 + 3*(-1)^n + 8*n + 12*n^2 - 6*(-1)^n*n^2 + 4*n^3)/24; a(1)=1 then a(n)=a(n-1)+n^(if n is even then 1 else 2), or a(n)=a(n-1)+n^(1+mod(n,2)), or a(n)=a(n-1)+n^((3-(-1)^n)/2)).

a(n)=a(n-1)+3a(n-2)-3a(n-3)-3a(n-4)+3a(n-5)+a(n-6)-a(n-7). G.f.: x*(1+2*x+6*x^2-2*x^3+x^4)/((1+x)^3*(x-1)^4). [From R. J. Mathar, Feb 22 2009]

MATHEMATICA

a[1]=1; a[n_]:=a[n]=a[n-1]+n^(1+Mod[n, 2]); Table[a[n], {n, 100}]

nxt[{n_, a_}]:={n+1, If[OddQ[n], a+n+1, a+(n+1)^2]}; Transpose[NestList[nxt, {1, 1}, 50]][[2]] (* Harvey P. Dale, Oct 11 2015 *)

CROSSREFS

Cf. A001082, A135370, A136048.

Sequence in context: A022411 A115229 A224924 * A082965 A045549 A103249

Adjacent sequences:  A136044 A136045 A136046 * A136048 A136049 A136050

KEYWORD

nonn,easy

AUTHOR

Zak Seidov, Dec 12 2007

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 14:50 EDT 2020. Contains 336381 sequences. (Running on oeis4.)