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.

A026922 Number of partitions of n into an odd number of parts, the greatest being 2; also, a(n+3) = number of partitions of n+1 into an even number of parts, each <=2.

Original entry on oeis.org

0, 1, 0, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 6, 7, 7, 8, 7, 8, 8, 9, 8, 9, 9, 10, 9, 10, 10, 11, 10, 11, 11, 12, 11, 12, 12, 13, 12, 13, 13, 14, 13, 14, 14, 15, 14, 15, 15, 16, 15, 16, 16, 17, 16, 17, 17, 18, 17, 18, 18, 19, 18, 19, 19, 20, 19, 20, 20, 21
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of partitions of n into two parts, the larger being odd (the conjugate of the defining partition). Example: a(10) = 3 because we have 55, 73 and 91. - Emeric Deutsch, Nov 12 2008

Examples

			a(10)=3 because we have 22222, 2221111 and 211111111. - _Emeric Deutsch_, Nov 12 2008
		

Crossrefs

Column 2 of A026920. Essentially the same as A008624.

Programs

  • Maple
    G:=x^2*(x^2-x+1)/((x+1)*(1-x)^2*(x^2+1)): Gser:= series(G,x=0,105): seq(coeff(Gser,x,n), n=1..82); # Emeric Deutsch, Nov 12 2008
    a := proc(n): if (n mod 4 = 3) then floor((n+2)/4) - 1 else floor((n+2)/4) fi: end: seq(a(n), n=1..82); # Johannes W. Meijer, Oct 10 2013
  • Mathematica
    CoefficientList[Series[x (1 - x + x^2) / (1 - x - x^4 + x^5), {x, 0, 100}], x] (* Vincenzo Librandi, Aug 15 2013 *)
  • PARI
    {a(n) = n \ 2 - ((n + 1) \ 4)} /* Michael Somos, Oct 14 2008 */

Formula

a(2*n + 1) = a(2*n - 2) = A004526(n).
a(n) = floor((n+2)/4) - [n == 3 mod 4] = floor((1/8)*{2*n - 1 + 3*(-1)^n + 2*(-1)^[(n-1)/2]}). - Ralf Stephan, Jun 09 2005
a(n) = A008624(n-2). - R. J. Mathar, Oct 23 2008
From Emeric Deutsch, Nov 12 2008: (Start)
G.f. = sum(sum(x^(2*i-1+j), j=1..2*i-1), i=1..infinity).
G.f. = x^2*(1-x+x^2)/[(1+x)*(1-x)^2*(1+x^2)]. (End)
From Michael Somos, Oct 14 2008: (Start)
Euler transform of length 6 sequence [ 0, 1, 1, 1, 0, -1].
a(n) = a(n-1) + a(n-4) - a(n-5). a(1 - n) = -a(n).
G.f.: x^2 * (1 - x + x^2) / (1 - x - x^4 + x^5). (End)

Extensions

More terms from Emeric Deutsch, Nov 12 2008