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.

A004652 Expansion of x*(1+x^2+x^4)/((1-x)*(1-x^2)*(1-x^3)).

Original entry on oeis.org

0, 1, 1, 3, 4, 7, 9, 13, 16, 21, 25, 31, 36, 43, 49, 57, 64, 73, 81, 91, 100, 111, 121, 133, 144, 157, 169, 183, 196, 211, 225, 241, 256, 273, 289, 307, 324, 343, 361, 381, 400, 421, 441, 463, 484, 507, 529, 553, 576, 601, 625, 651, 676, 703, 729, 757, 784, 813
Offset: 0

Views

Author

Keywords

Comments

As a Molien series this arises as (1+x^12)/((1-x^4)*(1-x^8)^2).
Starting (1, 3, 4, ...) = row sums of an infinite triangle with alternate columns of (1, 2, 3, ...) and (1, 0, 0, 0, ...). - Gary W. Adamson, May 14 2010
a(n) is also the number of inequivalent (modulo C_4 rotations) square n X n grids with squares coming in two colors and one square has one of the colors. See the formula from A054772. - Wolfdieter Lang, Oct 03 2016
Also the genus of the complete bipartite graph K_{n+2,n+2}. - Eric W. Weisstein, Jan 19 2018

Examples

			From _Gary W. Adamson_, May 14 2010: (Start)
First few rows of the generating triangle =
1;
2, 1;
3, 0, 1;
4, 0, 2, 1;
5, 0, 3, 0, 1;
6, 0, 4, 0, 2, 1;
7, 0, 5, 0, 3, 0, 1;
8, 0, 6, 0, 4, 0, 2, 1;
...
Example: a(7) = 13 = (6 + 0 + 4 + 0 + 2 + 1). (End)
x + x^2 + 3*x^3 + 4*x^4 + 7*x^5 + 9*x^6 + 13*x^7 + 16*x^8 + 21*x^9 + ...
		

Crossrefs

First differences give A028242. Cf. A035104, A035106.
A002061(n)=a(2*n-1). A035104(n)=a(n+7)-12. A035106(n)=a(n+3)-1.
Column 1 of A195040. - Omar E. Pol, Sep 28 2011
Cf. A054772, column 2.

Programs

  • Haskell
    a004652 = ceiling . (/ 4) . fromIntegral . (^ 2)
    a004652_list = 0 : 1 : zipWith (+) a004652_list [1..]
    -- Reinhard Zumkeller, Dec 18 2013
  • Magma
    [Ceiling(n^2/4): n in [0..60] ]; // Vincenzo Librandi, Aug 19 2011
    
  • Maple
    with(combstruct):ZL:=[st,{st=Prod(left,right),left=Set(U,card=r),right=Set(U,card=2)}, unlabeled]: subs(r=1,stack): seq(count(subs(r=2,ZL),size=m+3),m=0..57) ; # Zerinvary Lajos, Mar 09 2007
  • Mathematica
    CoefficientList[Series[x (1 - x + x^2)/((1 - x)^2*(1 - x^2)), {x, 0, 57}], x] (* Michael De Vlieger, Oct 03 2016 *)
    Table[Ceiling[n^2/4], {n, 0, 20}] (* Eric W. Weisstein, Jan 19 2018 *)
    Ceiling[Range[0, 20]^2/4] (* Eric W. Weisstein, Jan 19 2018 *)
    LinearRecurrence[{2, 0, -2, 1}, {1, 1, 3, 4}, {0, 20}] (* Eric W. Weisstein, Jan 19 2018 *)
  • PARI
    {a(n) = ceil(n^2 / 4)}
    

Formula

a(n) = ceiling(n^2/4).
a(-n) = a(n).
G.f.: x * (1 - x + x^2) / ((1 - x)^2 * (1 - x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + 1. a(2*n) = n^2, a(2*n-1) = n^2 - n + 1. - Michael Somos, Apr 21 2000
Interleaves square numbers with centered polygonal numbers: a(2*n)=A000290(n), a(2*n+1)=A002061(n+1). - Paul Barry, Mar 13 2003
For n > 1: a(n) is the digit reversal of n in base A008619(n), where a(n) is written in base 10. - Naohiro Nomoto, Mar 15 2004
a(n) = a(n-2) + n - 1. - Paul Barry, Jul 14 2004
Euler transform of length 6 sequence [ 1, 2, 1, 0, 0, -1]. - Michael Somos, Apr 03 2007
Starting (1, 3, 4, 7, 9, 13, ...), row sums of triangle A135840. - Gary W. Adamson, Dec 01 2007
a(n) = (3/8)*(-1)^(n+1) + 5/8 - (3/4)*(n+1) + (1/4)*(n+2)*(n+1). - Richard Choulet, Nov 27 2008
a(n) = n^2/4 - 3*((-1)^n-1)/8. - Omar E. Pol, Sep 28 2011
a(n) = -n + floor( (n+1)(n+3)/4 ). - Wesley Ivan Hurt, Jun 23 2013
a(n) = A054772(n, 1) = A054772(n, n^2-1), n >= 1. - Wolfdieter Lang, Oct 03 2016
E.g.f.: (x*(x + 1)*exp(x) + 3*sinh(x))/4. - Ilya Gutkovskiy, Oct 03 2016
a(n) = binomial(floor((n+3)/2),2) + binomial(floor((n+(-1)^n)/2),2). - Yuchun Ji, Feb 03 2021