A007294
Number of partitions of n into nonzero triangular numbers.
Original entry on oeis.org
1, 1, 1, 2, 2, 2, 4, 4, 4, 6, 7, 7, 10, 11, 11, 15, 17, 17, 22, 24, 25, 32, 35, 36, 44, 48, 50, 60, 66, 68, 81, 89, 92, 107, 117, 121, 141, 153, 159, 181, 197, 205, 233, 252, 262, 295, 320, 332, 372, 401, 417, 465, 501, 520, 575, 619, 645, 710, 763
Offset: 0
6 = 3+3 = 3+1+1+1 = 1+1+1+1+1+1 so a(6) = 4.
a(7)=4: Four sequences as above are (7,0,..), (5,1,0,..), (3,2,0,..),(2,1,1,0,..). They correspond to the partitions 1^7, 2 1^5, 2^2 1^3, 3 2 1^2 of seven or in the main description to the partitions 1^7, 3 1^4, 3^2 1, 6 1.
From _Gus Wiseman_, May 03 2019: (Start)
The a(1) = 1 through a(9) = 6 partitions using nonzero triangular numbers are the following. The Heinz numbers of these partitions are given by A325363.
1 11 3 31 311 6 61 611 63
111 1111 11111 33 331 3311 333
3111 31111 311111 6111
111111 1111111 11111111 33111
3111111
111111111
The a(1) = 1 through a(10) = 7 partitions with weakly decreasing multiplicities are the following. Equivalent to Matthew Vandermast's comment, the Heinz numbers of these partitions are given by A025487 (products of primorial numbers).
1 11 21 211 2111 321 3211 32111 32211 4321
111 1111 11111 2211 22111 221111 222111 322111
21111 211111 2111111 321111 2221111
111111 1111111 11111111 2211111 3211111
21111111 22111111
111111111 211111111
1111111111
The a(1) = 1 through a(11) = 7 partitions with weakly increasing differences (where the last part is taken to be zero) are the following. The Heinz numbers of these partitions are given by A325362 (A = 10, B = 11).
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A) (B)
(21) (31) (41) (42) (52) (62) (63) (73) (83)
(51) (61) (71) (72) (82) (92)
(321) (421) (521) (81) (91) (A1)
(531) (631) (731)
(621) (721) (821)
(4321) (5321)
(End)
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe and Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from T. D. Noe)
- Gert Almkvist, Asymptotics of various partitions, arXiv:math/0612446 [math.NT], 2006.
- G. E. Andrews, MacMahon's Partition Analysis II: Fundamental Theorems, Annals Combinatorics, 4 (2000), 327-338.
- N. A. Brigham, A General Asymptotic Formula for Partition Functions, Proc. Amer. Math. Soc., vol. 1 (1950), p. 191.
- Jorge A. Campos-Gonzalez-Angulo, Raphael F. Ribeiro, and Joel Yuen-Zhou, Generalization of the Tavis-Cummings model for multi-level anharmonic systems, arXiv:2101.09475 [physics.optics], 2021.
- Zhicheng Gao, Andrew MacFie and Daniel Panario, Counting words by number of occurrences of some patterns, The Electronic Journal of Combinatorics, 18 (2011), #P143.
- Igor Pak, Complexity problems in enumerative combinatorics, arXiv:1803.06636 [math.CO], 2018.
- James A. Sellers, Partitions Excluding Specific Polygonal Numbers As Parts, Journal of Integer Sequences, Vol. 7 (2004), Article 04.2.4.
- Jan Snellman and Michael Paulsen, Enumeration of Concave Integer Partitions, Journal of Integer Sequences, Vol. 7, 2004.
- Gus Wiseman, Sequences counting and ranking integer partitions by the differences of their successive parts.
Cf.
A179255 (condition only on differences),
A179269 (parts strictly increasing instead of nondecreasing). -
Joerg Arndt, Mar 22 2011
-
a007294 = p $ tail a000217_list where
p _ 0 = 1
p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
-- Reinhard Zumkeller, Jun 28 2013
-
b:= proc(n,i) option remember;
if n<0 then 0
elif n=0 then 1
elif i=0 then 0
else b(n, i-1) +b(n-i*(i+1)/2, i)
fi
end:
a:= n-> b(n, floor(sqrt(2*n))):
seq(a(n), n=0..100); # Alois P. Heinz, Mar 22 2011
isNondecrP :=proc(L) slp := DIFF(DIFF(L)) ; min(op(%)) >= 0 ; end proc:
A007294 := proc(n) local a, p; a := 0 ; if n = 0 then return 1 ; end if; for p in combinat[partition](n) do if nops(p) = nops(convert(p, set)) then if isNondecrP(p) then if nops(p) =1 then a := a+1 ; elif op(2, p) >= 2*op(1, p) then a := a+1; end if; end if; end if; end do; a ; end proc:
seq(A007294(n), n=0..30) ; # R. J. Mathar, Jan 07 2011
-
CoefficientList[ Series[ 1/Product[1 - x^(i(i + 1)/2), {i, 1, 50}], {x, 0, 70}], x]
(* also *)
t = Table[n (n + 1)/2, {n, 1, 200}] ; p[n_] := IntegerPartitions[n, All, t]; Table[p[n], {n, 0, 12}] (*shows partitions*)
a[n_] := Length@p@n; a /@Range[0, 80]
(* Clark Kimberling, Mar 09 2014 *)
b[n_, i_] := b[n, i] = Which[n < 0, 0, n == 0, 1, i == 0, 0, True, b[n, i-1]+b[n-i*(i+1)/2, i]]; a[n_] := b[n, Floor[Sqrt[2*n]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[n],OrderedQ[Differences[Append[#,0]]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
nmax = 58; t = Table[PolygonalNumber[n], {n, nmax}];
Table[Count[IntegerPartitions@n, x_ /; SubsetQ[t, x]], {n, 0, nmax}] (* Robert Price, Aug 02 2020 *)
-
N=66; Vec(1/prod(k=1,N,1-x^(k*(k+1)\2))+O(x^N)) \\ Joerg Arndt, Apr 14 2013
-
from functools import lru_cache
from sympy import divisors
from sympy.ntheory.primetest import is_square
@lru_cache(maxsize=None)
def A007294(n):
@lru_cache(maxsize=None)
def a(n): return is_square((n<<3)+1)
@lru_cache(maxsize=None)
def c(n): return sum(d for d in divisors(n,generator=True) if a(d))
return (c(n)+sum(c(k)*A007294(n-k) for k in range(1,n)))//n if n else 1 # Chai Wah Wu, Jul 15 2024
-
def A007294(n):
has_nondecreasing_diffs = lambda x: min(differences(x, 2)) >= 0
special = lambda x: (x[1]-x[0]) >= x[0]
allowed = lambda x: (len(x) < 2 or special(x)) and (len(x) < 3 or has_nondecreasing_diffs(x))
return len([1 for x in Partitions(n, max_slope=-1) if allowed(x[::-1])]) # D. S. McNeil, Jan 06 2011
A240026
Number of partitions of n such that the successive differences of consecutive parts are nondecreasing.
Original entry on oeis.org
1, 1, 2, 3, 5, 6, 10, 12, 16, 21, 27, 32, 43, 50, 60, 75, 90, 103, 128, 146, 170, 203, 234, 264, 315, 355, 402, 467, 530, 589, 684, 764, 851, 969, 1083, 1195, 1360, 1504, 1659, 1863, 2063, 2258, 2531, 2779, 3039, 3379, 3709, 4032, 4474, 4880, 5304, 5846, 6373, 6891, 7578, 8227, 8894, 9727, 10550, 11357, 12405, 13404, 14419
Offset: 0
There are a(10) = 27 such partitions of 10:
01: [ 1 1 1 1 1 1 1 1 1 1 ]
02: [ 1 1 1 1 1 1 1 1 2 ]
03: [ 1 1 1 1 1 1 1 3 ]
04: [ 1 1 1 1 1 1 4 ]
05: [ 1 1 1 1 1 2 3 ]
06: [ 1 1 1 1 1 5 ]
07: [ 1 1 1 1 2 4 ]
08: [ 1 1 1 1 6 ]
09: [ 1 1 1 2 5 ]
10: [ 1 1 1 7 ]
11: [ 1 1 2 6 ]
12: [ 1 1 3 5 ]
13: [ 1 1 8 ]
14: [ 1 2 3 4 ]
15: [ 1 2 7 ]
16: [ 1 3 6 ]
17: [ 1 9 ]
18: [ 2 2 2 2 2 ]
19: [ 2 2 2 4 ]
20: [ 2 2 6 ]
21: [ 2 3 5 ]
22: [ 2 8 ]
23: [ 3 3 4 ]
24: [ 3 7 ]
25: [ 4 6 ]
26: [ 5 5 ]
27: [ 10 ]
Cf.
A240027 (strictly increasing differences).
Cf.
A179255 (distinct parts, nondecreasing),
A179254 (distinct parts, strictly increasing).
-
Table[Length[Select[IntegerPartitions[n],OrderedQ[Differences[#]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
-
def partition(n, min, max)
return [[]] if n == 0
[max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
end
def f(n)
return 1 if n == 0
cnt = 0
partition(n, 1, n).each{|ary|
ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
cnt += 1 if ary0.sort == ary0.reverse
}
cnt
end
def A240026(n)
(0..n).map{|i| f(i)}
end
p A240026(50) # Seiichi Manyama, Oct 13 2018
A325360
Heinz numbers of integer partitions whose differences are weakly increasing.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73
Offset: 1
Most small numbers are in the sequence. However, the sequence of non-terms together with their prime indices begins:
18: {1,2,2}
36: {1,1,2,2}
50: {1,3,3}
54: {1,2,2,2}
70: {1,3,4}
72: {1,1,1,2,2}
75: {2,3,3}
90: {1,2,2,3}
98: {1,4,4}
100: {1,1,3,3}
Cf.
A007294,
A056239,
A112798,
A240026,
A325328,
A325352,
A325354,
A325360,
A325361,
A325368,
A325394,
A325400.
-
primeptn[n_]:=If[n==1,{},Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]];
Select[Range[100],OrderedQ[Differences[primeptn[#]]]&]
A325404
Number of reversed integer partitions y of n such that the k-th differences of y are distinct for all k >= 0 and are disjoint from the i-th differences for i != k.
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 2, 4, 4, 4, 5, 7, 5, 11, 12, 11, 12, 20, 15, 24, 22, 27, 28, 37, 28, 45, 43, 48, 50, 66, 58, 79, 72, 84, 87, 112, 106, 135, 128, 158, 147, 186, 180, 218, 220, 265, 246, 304, 303, 354, 340, 412, 418, 471, 463, 538, 543, 642, 600, 711, 755
Offset: 0
The a(1) = 1 through a(12) = 5 reversed partitions (A = 10, B = 11, C = 12):
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A) (B) (C)
(13) (14) (15) (16) (17) (18) (19) (29) (39)
(23) (25) (26) (27) (28) (38) (57)
(34) (35) (45) (37) (47) (1B)
(46) (56) (2A)
(1A)
(146)
Cf.
A279945,
A325325,
A325349,
A325353,
A325354,
A325365,
A325368,
A325391,
A325393,
A325405,
A325406,
A325468.
-
Table[Length[Select[Reverse/@IntegerPartitions[n],UnsameQ@@Join@@Table[Differences[#,k],{k,0,Length[#]}]&]],{n,0,30}]
A325356
Number of integer partitions of n whose augmented differences are weakly increasing.
Original entry on oeis.org
1, 1, 2, 2, 3, 3, 4, 3, 6, 5, 5, 6, 8, 6, 10, 9, 8, 10, 13, 10, 15, 14, 13, 15, 21, 15, 19, 21, 20, 25, 25, 20, 31, 30, 30, 32, 35, 28, 40, 44, 36, 42, 50, 43, 54, 53, 49, 57, 67, 58, 68, 66, 66, 78, 84, 71, 86, 92, 82, 99, 109
Offset: 0
The a(1) = 1 through a(8) = 6 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (32) (33) (43) (44)
(1111) (11111) (222) (1111111) (53)
(111111) (332)
(2222)
(11111111)
For example, the augmented differences of (6,6,5,3) are (1,2,3,3), which are weakly increasing, so (6,6,5,3) is counted under a(20).
Cf.
A000837,
A007294,
A049988,
A098859,
A325350,
A325351,
A325354,
A325357,
A325358,
A325360,
A325394.
A325468
Number of integer partitions y of n such that the k-th differences of y are distinct (independently) for all k >= 0.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 3, 5, 6, 6, 9, 11, 10, 15, 17, 19, 24, 31, 26, 40, 43, 51, 52, 72, 66, 89, 88, 111, 119, 150, 130, 183, 193, 229, 231, 279, 287, 358, 365, 430, 426, 538, 535, 649, 680, 742, 803, 943, 982, 1136, 1115
Offset: 0
The a(1) = 1 through a(9) = 6 partitions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(21) (31) (32) (42) (43) (53) (54)
(41) (51) (52) (62) (63)
(61) (71) (72)
(421) (431) (81)
(521) (621)
Cf.
A000009,
A325324,
A325325,
A325349,
A325353,
A325354,
A325391,
A325393,
A325404,
A325406,
A325467.
-
Table[Length[Select[IntegerPartitions[n],And@@Table[UnsameQ@@Differences[#,k],{k,0,Length[#]}]&]],{n,0,30}]
A325391
Number of reversed integer partitions of n whose k-th differences are strictly increasing for all k >= 0.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 3, 5, 5, 6, 8, 9, 9, 13, 13, 15, 19, 20, 20, 28, 28, 30, 36, 40, 40, 50, 50, 56, 64, 68, 68, 86, 86, 92, 102, 112, 114, 133, 133, 146, 158, 173, 173, 202, 202, 215, 237, 256, 256, 287, 287, 324, 340, 359, 359, 403, 423, 446, 464, 495, 495
Offset: 0
The a(1) = 1 through a(9) = 6 reversed partitions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(12) (13) (14) (15) (16) (17) (18)
(23) (24) (25) (26) (27)
(34) (35) (36)
(124) (125) (45)
(126)
The smallest reversed strict partition with strictly increasing differences not counted by this sequence is (1,2,4,7), whose first and second differences are (1,2,3) and (1,1) respectively.
Cf.
A179254,
A240026,
A325353,
A325354,
A325357,
A325393,
A325395,
A325398,
A325404,
A325406,
A325456,
A325468.
-
Table[Length[Select[Reverse/@IntegerPartitions[n],And@@Table[Less@@Differences[#,k],{k,0,Length[#]}]&]],{n,0,30}]
A325393
Number of integer partitions of n whose k-th differences are strictly decreasing for all k >= 0.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 8, 7, 9, 11, 10, 12, 15, 13, 16, 19, 18, 20, 24, 22, 26, 29, 28, 31, 37, 33, 38, 43, 42, 44, 52, 48, 55, 59, 58, 62, 72, 65, 74, 80, 80, 82, 94, 88, 99, 103, 104, 108, 123, 114, 126, 133, 135, 137, 155, 145, 161, 166, 169, 174
Offset: 0
The a(1) = 1 through a(9) = 5 partitions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(21) (31) (32) (42) (43) (53) (54)
(41) (51) (52) (62) (63)
(61) (71) (72)
(431) (81)
Cf.
A049988,
A320466,
A325353,
A325354,
A325358,
A325391,
A325396,
A325399,
A325404,
A325406,
A325457,
A325468.
-
Table[Length[Select[IntegerPartitions[n],And@@Table[Greater@@Differences[#,k],{k,0,Length[#]}]&]],{n,0,30}]
A325400
Heinz numbers of reversed integer partitions whose k-th differences are weakly increasing for all k >= 0.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74
Offset: 1
Most small numbers are in the sequence. However, the sequence of non-terms together with their prime indices begins:
18: {1,2,2}
36: {1,1,2,2}
50: {1,3,3}
54: {1,2,2,2}
60: {1,1,2,3}
70: {1,3,4}
72: {1,1,1,2,2}
75: {2,3,3}
90: {1,2,2,3}
98: {1,4,4}
100: {1,1,3,3}
108: {1,1,2,2,2}
120: {1,1,1,2,3}
126: {1,2,2,4}
140: {1,1,3,4}
144: {1,1,1,1,2,2}
147: {2,4,4}
150: {1,2,3,3}
154: {1,4,5}
162: {1,2,2,2,2}
Cf.
A007294,
A056239,
A112798,
A240026,
A325354,
A325360,
A325362,
A325394,
A325397,
A325398,
A325399,
A325405,
A325467.
-
primeptn[n_]:=If[n==1,{},Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]];
Select[Range[100],And@@Table[Greater@@Differences[primeptn[#],k],{k,0,PrimeOmega[#]}]&]
A325350
Number of integer partitions of n whose augmented differences are weakly decreasing.
Original entry on oeis.org
1, 1, 2, 3, 4, 6, 8, 10, 13, 17, 21, 26, 32, 38, 46, 56, 66, 78, 92, 106, 124, 145, 166, 191, 220, 249, 284, 325, 366, 413, 468, 523, 586, 659, 733, 817, 913, 1011, 1121, 1245, 1373, 1515, 1674, 1838, 2020, 2223, 2433, 2664, 2920, 3184, 3476, 3797, 4129, 4492
Offset: 0
The a(1) = 1 through a(8) = 13 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (31) (32) (42) (52) (53)
(111) (211) (41) (51) (61) (62)
(1111) (311) (321) (421) (71)
(2111) (411) (511) (521)
(11111) (3111) (3211) (611)
(21111) (4111) (4211)
(111111) (31111) (5111)
(211111) (32111)
(1111111) (41111)
(311111)
(2111111)
(11111111)
For example, (4,2,1,1) has augmented differences (3,2,1,1), which are weakly decreasing, so (4,2,1,1) is counted under a(8).
Cf.
A007294,
A098859,
A240026,
A320466,
A320509,
A325349,
A325353,
A325354,
A325356,
A325357,
A325358,
A325361,
A325364.
Showing 1-10 of 11 results.
Comments