cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Zak Seidov, Dec 12 2007

Keywords

Comments

The only prime terms are 3, 41, 47.
The semiprime terms are A136048.
Cf. A001082/A135370: f(1) = 1, then if n even/odd f(n) = n+f(n-1), if n odd/even f(n) = 2*n+f(n-1).

Crossrefs

Programs

  • 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 *)

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).
From R. J. Mathar, Feb 22 2009: (Start)
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(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). (End)

Extensions

Edited by Michel Marcus, Mar 02 2022

A144390 a(n) = 3*n^2 - n - 1.

Original entry on oeis.org

1, 9, 23, 43, 69, 101, 139, 183, 233, 289, 351, 419, 493, 573, 659, 751, 849, 953, 1063, 1179, 1301, 1429, 1563, 1703, 1849, 2001, 2159, 2323, 2493, 2669, 2851, 3039, 3233, 3433, 3639, 3851, 4069, 4293, 4523, 4759, 5001, 5249, 5503, 5763, 6029, 6301, 6579
Offset: 1

Views

Author

Paul Curtz, Oct 02 2008

Keywords

Comments

Sequence's original Name was "First bisection of A135370."
The partial sums of this sequence give A081437. - Leo Tavares, Dec 26 2021

Crossrefs

Cf. A081437 (partial sums).

Programs

Formula

a(n+1) = a(n) + 6*n + 2; see A016933.
G.f.: x*(1+6*x-x^2)/(1-x)^3. a(n) = A049450(n)-1. - R. J. Mathar, Oct 24 2008
a(-n) = A144391(n). - Michael Somos, Mar 27 2014
E.g.f.: (3*x^2 + 2*x -1)*exp(x) + 1. - G. C. Greubel, Jul 19 2017
From Leo Tavares, Dec 26 2021: (Start)
a(n) = A003215(n) - 2*A005408(n). See Bounded Hexagons illustration.
a(n) = A016754(n-1) - A002378(n-2). (End)
a(n) = A003154(n) - A049451(n-1). - John Elias, Dec 22 2022

Extensions

Edited by R. J. Mathar, Oct 24 2008
More terms from Vladimir Joseph Stephan Orlovsky, Oct 25 2008

A144391 a(n) = 3*n^2 + n - 1.

Original entry on oeis.org

3, 13, 29, 51, 79, 113, 153, 199, 251, 309, 373, 443, 519, 601, 689, 783, 883, 989, 1101, 1219, 1343, 1473, 1609, 1751, 1899, 2053, 2213, 2379, 2551, 2729, 2913, 3103, 3299, 3501, 3709, 3923, 4143, 4369, 4601, 4839, 5083, 5333, 5589, 5851, 6119, 6393, 6673
Offset: 1

Views

Author

Paul Curtz, Oct 02 2008

Keywords

Crossrefs

Programs

Formula

a(n) = A135370(2*n).
First differences: a(n+1) - a(n) = A016957(n).
a(n) - A144390(n) = 6*n + 4 = A005843(n).
From R. J. Mathar, Oct 24 2008: (Start)
G.f.: x*(3 + 4*x - x^2)/(1 - x)^3.
a(n) = A049451(n) - 1. (End)
E.g.f.: (3*x^2 + 4*x - 1)*exp(x) + 1. - G. C. Greubel, Jul 19 2017
a(n) = 1 + Sum_{i = n-1..2*n-1} 2*i. - Bruno Berselli, Feb 16 2018
a(n) = A003215(n) - (n+1)*2. - Leo Tavares, Jul 04 2021

Extensions

Edited by R. J. Mathar, Oct 24 2008
More terms from Vladimir Joseph Stephan Orlovsky, Mar 01 2009

A142888 First differences of A142705.

Original entry on oeis.org

3, -1, 13, -9, 29, -23, 51, -43, 79, -69, 113, -101, 153, -139, 199, -183, 251, -233, 309, -289, 373, -351, 443, -419, 519, -493, 601, -573, 689, -659, 783, -751, 883, -849, 989, -953, 1101, -1063, 1219, -1179, 1343, -1301, 1473, -1429, 1609, -1563, 1751
Offset: 1

Views

Author

Paul Curtz, Sep 29 2008

Keywords

Comments

Also obtained from A135370 if adjacent pairs are swapped and if the sequence is then multiplied by (-1)^(n+1).

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(3 + 2 x + 6 x^2 - x^4)/((1 + x)^3 (1 - x)^2), {x, 0, 60}], x] (* Vincenzo Librandi, May 25 2014 *)
    LinearRecurrence[{-1,2,2,-1,-1},{3,-1,13,-9,29},50] (* Harvey P. Dale, Apr 02 2018 *)
  • PARI
    Vec(x*(3+2*x+6*x^2-x^4)/((1+x)^3*(1-x)^2) + O(x^100)) \\ Colin Barker, Jan 26 2016

Formula

a(n) = A142705(n+1)-A142705(n).
a(n) = -a(n-1) +2*a(n-2) +2*a(n-3) -a(n-4) -a(n-5). - R. J. Mathar, Sep 12 2010
a(2n-1)+a(2n) = A005843(n).
G.f.: x(3+2x+6x^2-x^4)/((1+x)^3*(1-x)^2). - R. J. Mathar, Oct 24 2008, parenthesis added Sep 12 2010
From Colin Barker, Jan 26 2016: (Start)
a(n) = (5+3*(-1)^n+(10-6*(-1)^n)*n-6*(-1)^n*n^2)/8.
a(n) = (-3*n^2+2*n+4)/4 for n even.
a(n) = (3*n^2+8*n+1)/4 for n odd.
(End)

Extensions

Edited by R. J. Mathar, Oct 24 2008
More terms from Vincenzo Librandi, May 25 2014
Showing 1-4 of 4 results.