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.

A147685 Squares and centered square numbers interleaved.

Original entry on oeis.org

0, 1, 1, 5, 4, 13, 9, 25, 16, 41, 25, 61, 36, 85, 49, 113, 64, 145, 81, 181, 100, 221, 121, 265, 144, 313, 169, 365, 196, 421, 225, 481, 256, 545, 289, 613, 324, 685, 361, 761, 400, 841, 441, 925, 484, 1013, 529, 1105, 576, 1201, 625, 1301, 676, 1405, 729, 1513
Offset: 0

Views

Author

R. J. Mathar, Nov 10 2008

Keywords

Comments

This could be called the inverse Motzkin transform of A109188 since the substitution x -> x/(1+x+x^2) in the independent variable of the g.f. A109188(x) yields this sequence here.

Examples

			G.f. = x + x^2 + 5*x^3 + 4*x^4 + 13*x^5 + 9*x^6 + 25*x^7 + 16*x^8 + 41*x^9 + ...
		

Crossrefs

Programs

  • Maple
    A147685:=n->n^2*(1+(-1)^n)/8+(n^2+1)*(1-(-1)^n)/4: seq(A147685(n), n=0..70); # Wesley Ivan Hurt, Sep 06 2015
  • Mathematica
    CoefficientList[Series[x (1 + x + x^2) (1 + x^2)/((1 - x)^3 (1 + x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 07 2014 *)
  • PARI
    {a(n) = if( n%2, (n^2 + 1) / 2, n^2 / 4)}; /* Michael Somos, Aug 07 2014 */

Formula

a(2*n) = A000290(n), a(2*n+1) = A001844(n).
O.g.f.: x*(1+x+x^2)*(1+x^2)/((1-x)^3*(1+x)^3).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6), n>5.
Euler transform of length 4 sequence [ 1, 4, -1, -1]. - Michael Somos, Aug 07 2014
a(2n+1) = a(2n) + a(2n+2) for all n in Z. - Michael Somos, Aug 07 2014
A120328(n-1) = 3*n^2 + 2 = a(2*n + 1) - a(2*n)+ a(2*n - 1) for all n in Z. - Michael Somos, Aug 07 2014
a(n) = n^2*(1+(-1)^n)/8+(n^2+1)*(1-(-1)^n)/4. - Wesley Ivan Hurt, Sep 06 2015