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.

Showing 1-10 of 21 results. Next

A034296 Number of flat partitions of n: partitions {a_i} with each |a_i - a_{i-1}| <= 1.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 10, 13, 15, 18, 23, 26, 31, 39, 44, 52, 63, 72, 85, 101, 115, 134, 158, 181, 208, 243, 277, 318, 369, 418, 478, 549, 622, 710, 809, 914, 1036, 1177, 1328, 1498, 1695, 1904, 2143, 2416, 2706, 3036, 3408, 3811, 4264, 4769, 5319, 5934, 6621
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n such that all parts, with the possible exception of the largest, appear only once. Example: a(6)=7 because we have [6], [5,1], [4,2], [3,3], [3,2,1], [2,2,2] and [1,1,1,1,1,1] ([4,1,1], [3,1,1,1], [2,2,1,1], [2,1,1,1,1,1] do not qualify). - Emeric Deutsch and Vladeta Jovovic, Feb 23 2006
Also the number of partitions p of n such that d(p) > max(p) - min(p), where d is the number of distinct parts of p; indeed that inequality occurs only when d(p) = 1+ max(p) - min(p), so p satisfies a(i) - a(i-1) = 1 for all parts, ordered as a(i) >= a(i-1) > ... > a(k). - Clark Kimberling, Apr 18 2014
Flat partitions are also called gap-free partitions. See, for example, the Grabner et al. reference. - Emeric Deutsch, Sep 22 2016
Conjecture: Also the sum of the smallest parts in the distinct partitions of n with an odd number of parts. - George Beck, May 06 2017
Above conjecture was proved by Shane Chern, see link. - George Beck, Aug 12 2017
Note that Andrews [2016] uses a(0) = 1. - Michael Somos, Aug 07 2017
Also called number of compact partitions of n where a compact partition is one where every integer between the largest and smallest parts of it also appears as a part. [Andrews 2016] - Michael Somos, Aug 13 2017

Examples

			From _Joerg Arndt_, Dec 27 2012: (Start)
The a(11)=18 flat partitions of 11 are (in lexicographic order)
[ 1]  [ 1 1 1 1 1 1 1 1 1 1 1 ]
[ 2]  [ 2 1 1 1 1 1 1 1 1 1 ]
[ 3]  [ 2 2 1 1 1 1 1 1 1 ]
[ 4]  [ 2 2 2 1 1 1 1 1 ]
[ 5]  [ 2 2 2 2 1 1 1 ]
[ 6]  [ 2 2 2 2 2 1 ]
[ 7]  [ 3 2 1 1 1 1 1 1 ]
[ 8]  [ 3 2 2 1 1 1 1 ]
[ 9]  [ 3 2 2 2 1 1 ]
[10]  [ 3 2 2 2 2 ]
[11]  [ 3 3 2 1 1 1 ]
[12]  [ 3 3 2 2 1 ]
[13]  [ 3 3 3 2 ]
[14]  [ 4 3 2 1 1 ]
[15]  [ 4 3 2 2 ]
[16]  [ 4 4 3 ]
[17]  [ 6 5 ]
[18]  [ 11 ]
The a(11)=18 partitions of 11 where no part (except possibly the largest) is repeated are
[ 1]  [ 1 1 1 1 1 1 1 1 1 1 1 ]
[ 2]  [ 2 2 2 2 2 1 ]
[ 3]  [ 3 3 3 2 ]
[ 4]  [ 4 4 2 1 ]
[ 5]  [ 4 4 3 ]
[ 6]  [ 5 3 2 1 ]
[ 7]  [ 5 4 2 ]
[ 8]  [ 5 5 1 ]
[ 9]  [ 6 3 2 ]
[10]  [ 6 4 1 ]
[11]  [ 6 5 ]
[12]  [ 7 3 1 ]
[13]  [ 7 4 ]
[14]  [ 8 2 1 ]
[15]  [ 8 3 ]
[16]  [ 9 2 ]
[17]  [ 10 1 ]
[18]  [ 11 ]
(End)
		

Crossrefs

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

Programs

  • Maple
    g:= 1+sum(x^j*product(1+x^i, i=1..j-1)/(1-x^j), j=1..60): gser:=series(g, x=0, 55): seq(coeff(gser, x, n), n=0..50); # Emeric Deutsch, Feb 23 2006
    # second Maple program:
    b:= 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(b(n, k), k=0..n):
    seq(a(n), n=0..70);  # Alois P. Heinz, Jul 06 2012
  • Mathematica
    nn=54;Drop[CoefficientList[Series[Sum[x^i/(1-x^i)Product[1+x^j,{j,1,i-1}],{i,1,nn}],{x,0,nn}],x],1] (* Geoffrey Critzer, Sep 28 2013 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[b[n-i*j, i-1], {j, 1, n/i}]]]; a[n_] := Sum[b[n, k], {k, 1, n}]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Mar 24 2015, after Alois P. Heinz *)
    a[ n_] := SeriesCoefficient[ Sum[ x^k / (1 - x^k) QPochhammer[ -x, x, k - 1] // FunctionExpand, {k, n}], {x, 0, n}]; (* Michael Somos, Aug 07 2017 *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    gf = sum(n=1,N, x^n/(1-x^n) * prod(k=1,n-1,1+x^k) );
    v = Vec(gf)
    /* Joerg Arndt, Apr 21 2013 */
    
  • PARI
    {a(n) = my(t); if( n<1, 0, polcoeff(sum(k=1, n, (t *= 1 + x^k) * x^k / (1 - x^(2*k)), t = 1 + x * O(x^n)), n))}; /* Michael Somos, Aug 07 2017 */
    
  • PARI
    {a(n) = my(c); forpart(p=n, c++; for(i=1, #p-1, if( p[i+1] > p[i] + 1, c--; break))); c}; /* Michael Somos, Aug 13 2017 */
    
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def b(n, i): return 1 if n==0 else 0 if i<1 else sum(b(n - i*j, i - 1) for j in range(1, n//i + 1))
    def a(n): return sum(b(n, k) for k in range(n + 1))
    print([a(n) for n in range(71)]) # Indranil Ghosh, Aug 14 2017, after Maple code by Alois P. Heinz

Formula

G.f.: x/(1-x) + x^2/(1-x^2)*(1+x) + x^3/(1-x^3)*(1+x)*(1+x^2) + x^4/(1-x^4)*(1+x)*(1+x^2)*(1+x^3) + x^5/(1-x^5)*(1+x)*(1+x^2)*(1+x^3)*(1+x^4) + ... . - Emeric Deutsch and Vladeta Jovovic, Feb 22 2006
a(n) = Sum_{k=0..1} A238353(n,k). - Alois P. Heinz, Mar 09 2014
a(n) ~ exp(Pi*sqrt(n/3)) / (4*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, May 24 2018

Extensions

More terms from Emeric Deutsch, Feb 23 2006
a(0)=1 prepended by Alois P. Heinz, Aug 14 2017

A238710 Triangular array: t(n,k) = number of partitions p = {x(1) >= x(2) >= ... >= x(k)} such that max(x(j) - x(j-1)) = k.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 3, 3, 2, 1, 1, 1, 6, 3, 2, 1, 1, 3, 6, 6, 2, 2, 1, 1, 2, 10, 6, 5, 2, 2, 1, 1, 3, 11, 11, 6, 4, 2, 2, 1, 1, 1, 16, 13, 10, 5, 4, 2, 2, 1, 1, 5, 17, 19, 12, 9, 4, 4, 2, 2, 1, 1, 1, 24, 24, 18, 11, 8, 4, 4, 2, 2, 1, 1, 3, 27, 34
Offset: 1

Views

Author

Clark Kimberling, Mar 03 2014

Keywords

Comments

The first two columns are essentially A032741 and A237665. Counting the top row as row 2, the sum of numbers in row n is A000041(n) - 1.

Examples

			row 2:  1
row 3:  1 ... 1
row 4:  2 ... 1 ... 1
row 5:  1 ... 3 ... 1 ... 1
row 6:  3 ... 3 ... 2 ... 1 ... 1
row 7:  1 ... 6 ... 3 ... 2 ... 1 ... 1
row 8:  3 ... 6 ... 6 ... 2 ... 2 ... 1 ... 1
row 9:  2 ... 10 .. 6 ... 5 ... 2 ... 2 ... 1 ... 1
Let m = max(x(j) - x(j-1)); then for row 5, the 1 partition with m = 0 is 11111; the 3 partitions with m = 1 are 32, 221, 2111; the 1 partition with m = 2 is 311, and the 1 partition with m = 3 is 41.
		

Crossrefs

Programs

  • Mathematica
    z = 25; p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]]; m[n_, k_] := m[n, k] = Max[-Differences[p[n, k]]]; c[n_] := Table[m[n, h], {h, 1, PartitionsP[n]}]; v = Table[Count[c[n], h], {n, 2, z}, {h, 0, n - 2}]; Flatten[v]
    TableForm[v]

A355524 Minimal difference between adjacent prime indices of n > 1, or 0 if n is prime.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 3, 6, 1, 0, 0, 7, 4, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 6, 9, 0, 0, 0, 10, 0, 0, 3, 1, 0, 0, 7, 1, 0, 0, 0, 11, 0, 0, 1, 1, 0, 0, 0, 12, 0, 0, 4, 13, 8
Offset: 2

Views

Author

Gus Wiseman, Jul 10 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 9842 are {1,4,8,12}, with differences (3,4,4), so a(9842) = 3.
		

Crossrefs

Crossrefs found in the link are not repeated here.
Positions of first appearances are A077017 w/o the first term.
Positions of terms > 0 are A120944.
Positions of zeros are A130091.
Triangle A238353 counts m such that A056239(m) = n and a(m) = k.
For maximal difference we have A286470 or A355526.
Positions of terms > 1 are A325161.
If singletons (k) have minimal difference k we get A355525.
Positions of 1's are A355527.
Prepending 0 to the prime indices gives A355528.
A115720 and A115994 count partitions by their Durfee square.
A287352, A355533, A355534, A355536 list the differences of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[PrimeQ[n],0,Min@@Differences[primeMS[n]]],{n,2,100}]

A355526 Maximal difference between adjacent prime indices of n, or k if n is the k-th prime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 10 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 9842 are {1,4,8,12}, with differences (3,4,4), so a(9842) = 4.
		

Crossrefs

Crossrefs found in the link are not repeated here.
Positions of first appearances are 4 followed by A000040.
Positions of 0's are A025475, minimal version A013929.
Positions of 1's are 2 followed by A066312, minimal version A355527.
Triangle A238710 counts m such that A056239(m) = n and a(m) = k.
Prepending 0 to the prime indices gives A286469, minimal version A355528.
See also A286470, minimal version A355524.
The minimal version is A355525, triangle A238709.
The augmented version is A355532.
A001522 counts partitions with a fixed point (unproved), ranked by A352827.
A287352, A355533, A355534, A355536 list the differences of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[PrimeQ[n],PrimePi[n],Max@@Differences[primeMS[n]]],{n,2,100}]

A355525 Minimal difference between adjacent prime indices of n, or k if n is the k-th prime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 10 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 9842 are {1,4,8,12}, with differences (3,4,4), so a(9842) = 3.
		

Crossrefs

Crossrefs found in the link are not repeated here.
Positions of first appearances are 4 followed by A000040.
Positions of 0's are A013929, see also A130091.
Triangle A238709 counts m such that A056239(m) = n and a(m) = k.
For maximal instead of minimal difference we have A286470.
Positions of terms > 1 are A325160, also A325161.
See also A355524, A355528.
Positions of 1's are A355527.
A001522 counts partitions with a fixed point (unproved), ranked by A352827.
A238352 counts partitions by fixed points, rank statistic A352822.
A287352, A355533, A355534, A355536 list the differences of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[PrimeQ[n],PrimePi[n],Min@@Differences[primeMS[n]]],{n,2,100}]

A224956 Number of partitions of n where the difference between consecutive parts is at most 2.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 16, 19, 26, 31, 42, 50, 65, 78, 100, 119, 149, 178, 222, 263, 322, 382, 465, 549, 660, 778, 932, 1093, 1299, 1520, 1798, 2096, 2464, 2868, 3357, 3892, 4536, 5247, 6096, 7028, 8133, 9357, 10795, 12388, 14244, 16309, 18706, 21367, 24440, 27857, 31788, 36157
Offset: 0

Views

Author

Joerg Arndt, Apr 21 2013

Keywords

Comments

Also (by taking the conjugate), a(n) is the number of partitions of n such that all parts, with the possible exception of the largest are repeated at most twice. - Geoffrey Critzer, Sep 30 2013

Examples

			The a(7)=11 such partitions of 7 are
01:  [ 1 1 1 1 1 1 1 ]
02:  [ 2 1 1 1 1 1 ]
03:  [ 2 2 1 1 1 ]
04:  [ 2 2 2 1 ]
05:  [ 3 1 1 1 1 ]
06:  [ 3 2 1 1 ]
07:  [ 3 2 2 ]
08:  [ 3 3 1 ]
09:  [ 4 2 1 ]
10:  [ 4 3 ]
11:  [ 7 ]
The a(7)=11 partitions with no part (excepting the largest) repeated more than twice are the conjugates of the above respectively:
01:  [7]
02:  [6 1]
03:  [5 2]
04:  [4 3]
05:  [5 1 1]
06:  [4 2 1]
07:  [3 3 1]
08:  [3 2 2]
09:  [3 2 1 1]
10:  [2 2 2 1]
11:  [1 1 1 1 1 1 1]
		

Crossrefs

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

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1, `if`(j>0, 0, 1)), j=t..n/i)))
        end:
    a:= n-> add(b(n, k, 1), k=0..n):
    seq(a(n), n=0..70);  #  Alois P. Heinz, May 01 2013
  • Mathematica
    nn=53;CoefficientList[Series[1+Sum[x^k/(1-x^k)Product[1+x^i+x^(2i),{i,1,k-1}],{k,1,nn}],{x,0,nn}],x] (* Geoffrey Critzer, Sep 30 2013 *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i<1, 0, Sum[b[n-i*j, i-1, If[j>0, 0, 1]], {j, t, n/i}]]]; a[n_] := Sum[b[n, k, 1], {k, 0, n}]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Jun 19 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^i+q^(2*i) ) ) )
    \\ Joerg Arndt, Mar 08 2014

Formula

O.g.f.: 1 + sum(k>=1, x^k/(1-x^k) * prod(i=1..k-1, 1+x^i+x^(2*i) ) ). - Geoffrey Critzer, Sep 30 2013
a(n) = Sum_{k=0..2} A238353(n,k). - Alois P. Heinz, Mar 09 2014
a(n) ~ exp(2*Pi*sqrt(n)/3) / (6 * n^(3/4)). - Vaclav Kotesovec, Jan 26 2022

A238863 Number of partitions of n where the difference between consecutive parts is at most 3.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 13, 18, 24, 32, 41, 54, 68, 87, 111, 139, 174, 218, 269, 333, 410, 501, 611, 745, 902, 1090, 1315, 1578, 1891, 2263, 2695, 3205, 3805, 4503, 5322, 6277, 7384, 8673, 10172, 11904, 13908, 16227, 18894, 21971, 25516, 29578, 34245, 39597, 45717, 52720, 60721, 69842, 80243, 92091, 105559, 120865, 138248
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 three times (by taking conjugates).
The g.f. for "max difference d" is 1 + Sum_{k>=1} q^k/(1 - q^k) * Product_{i=1..k-1} (1 - q^((d+1)*i))/(1 - q^i), see cross references.

Crossrefs

Sequences "number of partitions with max diff d": A000005 (d=0, for n>=1), A034296 (d=1), A224956 (d=2), this sequence, A238864 (d=4), 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(3, 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[3, 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^(4*i))/(1-q^i) ) ) )

Formula

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

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

A238865 Number of partitions of n where the difference between consecutive parts is at most 5.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 21, 28, 38, 50, 67, 87, 114, 146, 188, 238, 302, 379, 476, 593, 737, 911, 1124, 1379, 1688, 2058, 2504, 3034, 3669, 4422, 5319, 6378, 7634, 9114, 10859, 12908, 15316, 18134, 21434, 25283, 29775, 35001, 41080, 48133, 56312, 65778, 76727, 89366, 103947, 120739, 140065, 162271, 187769, 217006, 250504
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 five 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), A238864 (d=4), this sequence, 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(5, 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[5, 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 *)
    Table[Count[IntegerPartitions[n],?(Max[Abs[Differences[#]]]<6&)],{n,0,60}] (* _Harvey P. Dale, Feb 04 2017 *)
  • 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^(6*i))/(1-q^i) ) ) )

Formula

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

A238866 Number of partitions of n where the difference between consecutive parts is at most 6.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 29, 40, 52, 71, 91, 121, 155, 202, 255, 328, 410, 520, 647, 810, 1000, 1244, 1525, 1879, 2293, 2804, 3401, 4135, 4988, 6028, 7241, 8701, 10404, 12447, 14818, 17645, 20931, 24822, 29334, 34658, 40817, 48052, 56416, 66190, 77471, 90621, 105756, 123338, 143555, 166956, 193815, 224828, 260352
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 6 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), A238864 (d=4), A238865 (d=5), this sequence, 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(6, 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[6, 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^(7*i))/(1-q^i) ) ) )

Formula

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