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.

A240855 Number of partitions p of n into distinct parts including the number of parts.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 2, 1, 2, 3, 4, 3, 5, 6, 8, 9, 10, 12, 16, 18, 22, 25, 29, 34, 41, 48, 55, 64, 74, 84, 98, 114, 130, 150, 170, 195, 222, 252, 287, 328, 371, 420, 475, 536, 604, 682, 766, 862, 970, 1088, 1218, 1365, 1526, 1704, 1904, 2124, 2366, 2637, 2934
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2014

Keywords

Examples

			a(10) counts these 4 partitions:  82, 631, 532, 4321.
		

Crossrefs

Programs

  • Maple
    h:= (p, i)-> add(coeff(p, x, j)*x^j, j=i+1..degree(p)):
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 [h(g[1], i), g[2]])(b(n, i-1, p)+
         (f-> f+[0, coeff(f[1], x, i)])(b(n-i, min(n-i, i-1), p+1)))))
        end:
    a:= n-> b(n$2, 0)[2]:
    seq(a(n), n=0..58);  # Alois P. Heinz, Mar 14 2024
  • Mathematica
    z = 40;
    f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
    Table[Count[f[n], p_ /; MemberQ[p, Length[p]]], {n, 0, z}] (* this sequence *)
    Table[Count[f[n], p_ /; !MemberQ[p, Length[p]]], {n, 0, z}] (* A240861 *)
  • PARI
    p_q(k) = {prod(j=1,k, 1-q^j);}
    mGB_q(N,M) = {p_q(N+M)/(p_q(M)*(p_q(N)^2));}
    A_q(N) = {my(q='q+O('q^N), g=sum(i=1, N, sum(j=1, i, q^((i*(i+1)/2)+(j*(j-1))) * mGB_q(j-1,i-j))));
    concat([0], Vec(g)) }
    A_q(50) \\ John Tyler Rascoe, Mar 13 2024

Formula

a(n) = A000009(n) - A240861(n).
G.f.: Sum_{i>0} Sum_{j=1..i} q^((i*(i+1)/2) + j*(j-1)) * [j-1,i-j]q, where [N,M]_q = Product{j=1..N+M}(1-q^j) / (Product_{j=1..M}(1-q^j) * (Product_{j=1..N}(1-q^j))^2). - John Tyler Rascoe, Mar 13 2024