A224956 Number of partitions of n where the difference between consecutive parts is at most 2.
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
Keywords
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]
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
Crossrefs
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
Comments