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.

A238864 Number of partitions of n where the difference between consecutive parts is at most 4.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 14, 20, 26, 36, 46, 63, 79, 104, 131, 169, 210, 269, 332, 418, 515, 640, 782, 967, 1173, 1435, 1736, 2108, 2534, 3062, 3663, 4398, 5243, 6259, 7429, 8834, 10441, 12356, 14559, 17159, 20144, 23661, 27686, 32403, 37807, 44102, 51306, 59680, 69235, 80297, 92924, 107482, 124070, 143157, 164862, 189763, 218057
Offset: 0

Views

Author

Joerg Arndt, Mar 08 2014

Keywords

Comments

Also the number of partitions of n such that all parts, with the possible exception of the largest are repeated at most four times (by taking conjugates).

Crossrefs

Sequences "number of partitions with max diff d": A000005 (d=0, for n>=1), A034296 (d=1), A224956 (d=2), A238863 (d=3), this sequence, A238865 (d=5), A238866 (d=6), A238867 (d=7), A238868 (d=8), A238869 (d=9), A000041 (d --> infinity).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1), j=0..min(4, n/i))))
        end:
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1), j=1..n/i)))
        end:
    a:= n-> add(g(n, k), k=0..n):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 09 2014
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i-1], {j, 0, Min[4, n/i]}]]]; g[n_, i_] := g[n, i] = If[n == 0, 1, If[i<1, 0, Sum[b[n - i*j, i - 1], {j, 1, n/i}]]]; a[n_] := Sum[g[n, k], {k, 0, n}]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Feb 18 2015, after Alois P. Heinz *)
  • PARI
    N=66;  q = 'q + O('q^N);
    Vec( 1 + sum(k=1, N, q^k/(1-q^k) * prod(i=1,k-1, (1-q^(5*i))/(1-q^i) ) ) )

Formula

G.f.: 1 + sum(k>=1, q^k/(1-q^k) * prod(i=1..k-1, (1-q^(5*i))/(1-q^i) ) ).
a(n) = Sum_{k=0..4} A238353(n,k). - Alois P. Heinz, Mar 09 2014
a(n) ~ exp(Pi*sqrt(8*n/15)) / (3^(1/4) * 10^(3/4) * n^(3/4)). - Vaclav Kotesovec, Jan 26 2022