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.

A116449 Number of partitions of n into an equal number of prime and composite parts.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 4, 3, 4, 4, 6, 6, 11, 11, 13, 17, 20, 26, 32, 37, 43, 55, 63, 81, 92, 111, 126, 159, 183, 225, 259, 307, 357, 430, 497, 589, 683, 797, 929, 1093, 1270, 1478, 1712, 1979, 2303, 2665, 3086, 3556, 4102, 4716, 5444, 6256, 7194, 8243, 9456, 10824
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 16 2006

Keywords

Comments

a(n) = A002865(n) - A116450(n).

Examples

			a(14) = #{2+2*2*3, (2+2)+(2*3+2*2), 5+3*3, (3+3)+(2*2+2*2)} =
4;
a(15) = #{3+2*2*3, 5+2*5, (2+3)+(2*2+2*3), 7+2*2*2,
(2+5)+(2*2+2*2), 11+2*2} = 6.
		

Programs

  • Mathematica
    terms = 61;
    pp = 1/(Product[1 - If[PrimeQ[k], y, 1/y]*x^k, {k, 2, terms-3}] + O[x]^terms) // Normal;
    Take[Expand[pp ], terms-5] // CoefficientList[#, x]& (* Jean-François Alcover, Dec 30 2017, after Andrew Howroyd *)
  • PARI
    parts(n)={1/(prod(k=2, n, 1 - if(isprime(k), y, 1/y)*x^k + O(x*x^n)))}
    {my(n=60); apply(p->polcoeff(p,0), Vec(parts(n)))} \\ Andrew Howroyd, Dec 29 2017

Extensions

a(0)=1 from Andrew Howroyd, Dec 29 2017