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
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)
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
- George E. Andrews, The Bhargava-Adiga Summation and Partitions, 2016; See page 4 equation (2.1).
- Shane Chern, On a conjecture of George Beck, arXiv:1705.10700 [math.NT], 2017.
- P. J. Grabner, A. Knopfmacher, Analysis of some new partition statistics, Ramanujan J., 12, 2006, 439-454.
- Jia Huang, Compositions with restricted parts, arXiv:1812.11010 [math.CO], 2018. Also Discrete Masth., 343 (2020), # 111875.
- Jane Y. X. Yang, Combinatorial proofs and generalizations on conjectures related with Euler's partition theorem, arXiv:1801.06815 [math.CO], 2018.
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).
-
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
-
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 *)
-
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 */
-
{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 */
-
{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 */
-
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
A336902
Sum of the smallest parts of all compositions of n into distinct parts.
Original entry on oeis.org
0, 1, 2, 5, 6, 11, 18, 25, 32, 53, 84, 107, 156, 205, 302, 497, 618, 863, 1206, 1597, 2228, 3569, 4440, 6191, 8256, 11329, 14642, 20477, 30390, 38555, 52578, 69625, 92696, 122141, 160500, 211955, 310476, 386941, 521102, 678617, 901386, 1155383, 1529742, 1940749
Offset: 0
a(6) = 18 = 1 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 1 + 1 + 6: (1)23, (1)32, 2(1)3, 23(1), 3(1)2, 32(1), (2)4, 4(2), (1)5, 5(1), (6).
-
b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n$2, 1):
seq(a(n), n=0..50);
-
b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n || i < 1, 0,
If[i == n, i*p!, b[n-i, Min[n-i, i-1], p+1]] + b[n, i-1, p]];
a[n_] := b[n, n, 1];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)
A336903
Sum of the largest parts of all compositions of n into distinct parts.
Original entry on oeis.org
0, 1, 2, 7, 10, 19, 42, 61, 98, 151, 304, 403, 654, 925, 1400, 2431, 3328, 4903, 7056, 10117, 13952, 23419, 30406, 44683, 61308, 87289, 116822, 164359, 247774, 327715, 457542, 624445, 855062, 1148023, 1559188, 2058643, 3043506, 3906637, 5375732, 7111975, 9679852
Offset: 0
a(6) = 42 = 3 + 3 + 3 + 3 + 3 + 3 + 4 + 4 + 5 + 5 + 6: 12(3), 1(3)2, 21(3), 2(3)1, (3)12, (3)21, 2(4), (4)2, 1(5), (5)1, (6).
-
b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 `if`(n=0, 0, b(n$2, 0)):
seq(a(n), n=0..50);
-
b[n_, i_, p_] := b[n, i, p] = If[i(i + 1)/2 < n, 0,
If[n == 0, p!, b[n - i, Min[n - i, i - 1], p + 1]*
If[p == 0, i, 1] + b[n, i - 1, p]]];
a[n_] := If[n == 0, 0, b[n, n, 0]];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)
A026832
Number of partitions of n into distinct parts, the least being odd.
Original entry on oeis.org
0, 1, 0, 2, 1, 2, 2, 4, 4, 5, 6, 8, 10, 12, 14, 18, 21, 24, 30, 36, 42, 50, 58, 68, 80, 93, 108, 126, 146, 168, 194, 224, 256, 294, 336, 384, 439, 500, 568, 646, 732, 828, 938, 1060, 1194, 1348, 1516, 1704, 1916, 2149, 2408, 2698, 3018, 3372, 3766, 4202, 4682
Offset: 0
a(7)=4 because we have [7], [6,1], [4,3] and [4,2,1].
- N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 56, Eq. (26.28).
-
a026832 n = p 1 n where
p _ 0 = 1
p k m = if m < k then 0 else p (k+1) (m-k) + p (k+1+0^(n-m)) m
-- Reinhard Zumkeller, Jun 14 2012
-
g:=sum(x^(2*k-1)*product(1+x^j, j=2*k..60), k=1..60): gser:=series(g, x=0, 55): seq(coeff(gser, x, n), n=0..53); # Emeric Deutsch, Mar 29 2006
# second Maple program:
b:= proc(n, i) option remember; `if`(i*(i+1)/2 `if`(n=0, 0, b(n$2)):
seq(a(n), n=0..60); # Alois P. Heinz, Feb 01 2019
-
mx=53; Rest[CoefficientList[Series[Sum[x^(2*k-1) Product[1+x^j, {j, 2*k, mx}], {k, mx}], {x, 0, mx}], x]] (* Jean-François Alcover, Apr 05 2011, after Emeric Deutsch *)
Join[{0},Table[Length[Select[IntegerPartitions[n],OddQ[#[[-1]]]&&Max[Tally[#][[All,2]]] == 1&]],{n,60}]] (* Harvey P. Dale, May 14 2022 *)
A237665
Number of partitions of n such that the distinct terms arranged in increasing order form a string of two or more consecutive integers.
Original entry on oeis.org
0, 0, 0, 1, 1, 3, 3, 6, 6, 10, 11, 16, 17, 24, 27, 35, 39, 50, 57, 70, 79, 97, 111, 132, 150, 178, 204, 239, 271, 316, 361, 416, 472, 545, 618, 706, 800, 912, 1032, 1173, 1320, 1496, 1687, 1902, 2137, 2410, 2702, 3034, 3398, 3808, 4258, 4765, 5313, 5932, 6613
Offset: 0
The qualifying partitions of 8 are 332, 3221, 32111, 22211, 221111, 2111111, so that a(8) = 6. (The strings of distinct parts arranged in increasing order are 23, 123, 123, 12, 12, 12.)
-
b:= proc(n, i, t) option remember;
`if`(n=0 or i=1, `if`(n=0 and t=2 or n>0 and t>0, 1, 0),
`if`(i>n, 0, add(b(n-i*j, i-1, min(t+1, 2)), j=1..n/i)))
end:
a:= n-> add(b(n, i, 0), i=1..n):
seq(a(n), n=0..60); # Alois P. Heinz, Feb 15 2014
-
Map[Length[Select[Map[Differences[DeleteDuplicates[#]] &, IntegerPartitions[#]], (Table[-1, {Length[#]}] == # && # =!= \{}) &]] &, Range[55]] (* Peter J. C. Moses, Feb 09 2014 *)
b[n_, i_, t_] := b[n, i, t] = If[n==0 || i==1, If[n==0 && t==2 || n>0 && t > 0, 1, 0], If[i>n, 0, Sum[b[n-i*j, i-1, Min[t+1, 2]], {j, 1, n/i}]]]; a[n_] := Sum[b[n, i, 0], {i, 1, n}]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 17 2015, after Alois P. Heinz *)
A026821
Triangular array T read by rows: T(n,k) = number of partitions of n into distinct parts, the least being k, for k=1,2,...,n.
Original entry on oeis.org
1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 1, 0, 0, 0, 1, 2, 1, 1, 0, 0, 0, 1, 3, 1, 1, 0, 0, 0, 0, 1, 3, 2, 1, 1, 0, 0, 0, 0, 1, 5, 2, 1, 1, 0, 0, 0, 0, 0, 1, 5, 3, 1, 1, 1, 0, 0, 0, 0, 0, 1, 7, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 1, 8, 4, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0
Offset: 1
T(11,2)=3 because we have [9,2],[6,3,2] and [5,4,2].
Triangle starts:
1;
0,1;
1,0,1;
1,0,0,1;
1,1,0,0,1;
-
g:=sum(t^j*x^j*product(1+x^i,i=j+1..50),j=1..50): gser:=simplify(series(g,x=0,18)): for n from 1 to 14 do P[n]:=sort(coeff(gser,x^n)) od: seq(seq(coeff(P[n],t^j),j=1..n),n=1..14); # Emeric Deutsch, Feb 24 2006
A117455
Sum of the differences between the largest part and smallest part over all partitions of n into distinct parts.
Original entry on oeis.org
0, 0, 1, 2, 4, 8, 12, 19, 27, 41, 54, 76, 99, 133, 171, 223, 279, 357, 443, 554, 682, 841, 1022, 1247, 1504, 1814, 2174, 2603, 3092, 3676, 4346, 5127, 6030, 7076, 8275, 9669, 11254, 13078, 15167, 17556, 20270, 23377, 26899, 30902, 35448, 40592, 46403
Offset: 1
a(7)=12 because the partitions of 7 into distinct parts are [7], [6,1], [5,2], [4,3] and [4,2,1] and (7-7)+(6-1)+(5-2)+(4-3)+(4-1)=12.
-
g:=sum(x^(i*(i+1)/2)*sum(1/(1-x^j),j=1..i-1)/product(1-x^j,j=1..i),i=1..15): gser:=series(g,x=0,55): seq(coeff(gser,x^n), n=1..50);
# second Maple program:
b:= proc(n, i) option remember;
`if`(i=n, n, 0)+`if`(i>0, b(n, i-1)+
`if`(i g(n, 1) -b(n, n):
seq(a(n), n=1..60); # Alois P. Heinz, Jul 06 2012
-
b[n_, i_] := b[n, i] = If[i==n, n, 0] + If[i>0, b[n, i-1] + If[iJean-François Alcover, Mar 24 2015, after Alois P. Heinz *)
A277230
Irregular triangular array T(n, k) giving in row n the base of the Ferrers diagram of the k-th partition of n into distinct parts. The partitions of n are taken in Abramowitz-Stegun order but with decreasing parts. T(n, k) is the smallest part of the k-th partition of n into distinct parts.
Original entry on oeis.org
1, 2, 3, 1, 4, 1, 5, 1, 2, 6, 1, 2, 1, 7, 1, 2, 3, 1, 8, 1, 2, 3, 1, 1, 9, 1, 2, 3, 4, 1, 1, 2, 10, 1, 2, 3, 4, 1, 1, 1, 2, 1, 11, 1, 2, 3, 4, 5, 1, 1, 1, 2, 2, 1, 12, 1, 2, 3, 4, 5, 1, 1, 1, 1, 2, 2, 3, 1, 1, 13, 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 2, 2, 2, 3, 1, 1, 1, 14, 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 1, 1, 1, 1, 2, 15, 1, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 1, 1, 1, 1, 1, 2, 1
Offset: 1
The irregular triangle begins (brackets separate partitions with equal number of parts m = 1, 2, 3,..., A003056(n)):
n\k 1 2 3 4 5 6 7 8 9 10 ...
1: [1]
2: [2]
3: [3] [1]
4: [4] [1]
5: [5] [1, 2]
6: [6] [1, 2] [1]
7: [7] [1, 2, 3] [1]
8: [8] [1, 2, 3] [1, 1]
9: [9] [1, 2, 3, 4] [1, 1, 2]
10: [10] [1, 2, 3, 4] [1, 1, 1, 2] [1]
...
n = 11: [11] [1, 2, 3, 4, 5] [1, 1, 1, 2, 2] [1],
n = 12: [12] [1, 2, 3, 4, 5] [1, 1, 1, 1, 2, 2, 3] [1, 1],
n = 13: [13] [1, 2, 3, 4, 5, 6] [1, 1, 1, 1, 2, 2, 2, 3] [1, 1, 1],
n = 14: [14] [1, 2, 3, 4, 5, 6] [1, 1, 1, 1, 1, 2, 2, 2, 3, 3] [1, 1, 1, 1, 2],
n = 15: [15] [1, 2, 3, 4, 5, 6, 7] [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4] [1, 1, 1, 1, 1, 2] [1].
----------------------------------------
The partition of n = 5 + 4 + 1 = 10 has base 1 and slope 2 (beta < sigma):
o o o o o
o o o o
o
The partition of n = 5 + 3 + 1 = 9 has base 1 and slope 1 (beta = sigma):
o o o o o
o o o
o
The partition of n = 5 + 3 + 2 = 10 has base 2 and slope 1 (beta > sigma):
o o o o o
o o o
o o
------------------------------------------
The partitions of n = 6 with m = 1, 2, and 3, (3 = A003056(6)) distinct parts are:
[6], [[5, 1], [4, 2]], [3, 2, 1], with base numbers in row n=6: [6] [1, 2] [1]
and slope numbers in row n=6 of A277231:
[1] [1, 1] [3].
- Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, pp. 389-391, 396, 595.
- G. H. Hardy, Ramanujan, AMS Chelsea Publ., Providence, RI, 2002, pp. 83-85.
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 5th ed., Clarendon Press, Oxford, 2003, pp. 284-287.
- P. A. MacMahon, Combinatory Analysis, Vol. II, Chelsea Publishing Company, New York, 1960, pp. 21-23.
-
Table[Function[w, Flatten@ Map[Function[k, Min /@ Select[w, Length@ # == k &]], Range@ Max@ Map[Length, w]]]@ Select[ DeleteCases[ IntegerPartitions@ n, w_ /; MemberQ[Differences@ w, 0]], Length@ # <= Floor[(Sqrt[1 + 8 n] - 1)/2] &], {n, 15}] // Flatten (* Michael De Vlieger, Oct 26 2016 *)
A206762
a(n) is the least number from 1,2,...,n-1, such that n!/a(n)+1 is prime, and a(n)=0, if such number does not exist.
Original entry on oeis.org
1, 1, 2, 2, 3, 2, 2, 5, 6, 1, 8, 2, 5, 7, 2, 3, 0, 5, 8, 4, 16, 3, 8, 4, 10, 1, 13, 8, 2, 19, 4, 11, 11, 7, 3, 1, 12, 13, 4, 1, 24, 2, 8, 5, 9, 25, 16, 2, 12, 0, 26, 0, 17, 22, 44, 22, 37, 7, 48, 4, 37, 18, 7, 39, 16, 19, 7, 15, 19, 36, 30, 1, 14, 15, 16, 1
Offset: 2
-
Table[s = Select[Range[n - 1], PrimeQ[n!/# + 1] &, 1]; If[s == {}, 0, s[[1]]], {n, 2, 100}] (* T. D. Noe, Feb 13 2012 *)
Showing 1-9 of 9 results.
Comments