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.

A238217 The total number of 2's in all partitions of n into an even number of distinct parts.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 7, 8, 10, 11, 14, 16, 19, 22, 26, 30, 35, 41, 47, 55, 63, 73, 84, 97, 110, 127, 145, 166, 188, 215, 243, 277, 313, 354, 400, 452, 508, 573, 644, 723, 811, 910, 1018, 1139, 1273, 1421, 1586, 1768, 1968, 2190, 2436
Offset: 0

Views

Author

Mircea Merca, Feb 20 2014

Keywords

Comments

The g.f. for "number of k's" is (1/2)*(x^k/(1+x^k))*(Product_{n>=1} 1 + x^n) - (1/2)*(x^k/(1-x^k))*(Product_{n>=1} 1 - x^n).

Examples

			a(12) = 3 because the partitions in question are: 10+2, 6+3+2+1, 5+4+2+1.
		

Crossrefs

Column k=2 of A238451.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],EvenQ[Length[#]]&&Length[#] == Length[ Union[#]]&&MemberQ[#,2]&]],{n,0,50}] (* Harvey P. Dale, Dec 09 2014 *)
    nmax = 100; With[{k=2}, CoefficientList[Series[x^k/(1+x^k)/2 * Product[1 + x^j, {j, 1, nmax}] - x^k/(1-x^k)/2 * Product[1 - x^j, {j, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jul 05 2025 *)
  • PARI
    seq(n)={my(A=O(x^(n-1))); Vec(x*(eta(x^2 + A)/(eta(x + A)*(1+x^2)) - eta(x + A)/(1-x^2))/2, -(n+1))} \\ Andrew Howroyd, May 01 2020

Formula

a(n) = Sum_{j=1..round(n/4)} A067659(n-(2*j-1)*2) - Sum_{j=1..floor(n/4)} A067661(n-4*j).
G.f.: (1/2)*(x^2/(1+x^2))*(Product_{n>=1} 1 + x^n) - (1/2)*(x^2/(1-x^2))*(Product_{n>=1} 1 - x^n).
a(n) ~ exp(Pi*sqrt(n/3)) / (16 * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Jul 05 2025

Extensions

Terms a(51) and beyond from Andrew Howroyd, May 01 2020