Nothing Special   »   [go: up one dir, main page]

login
Search: a103295 -id:a103295
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of partitions of n that do not contain 1 as a part.
(Formerly M0309 N0113)
+10
408
1, 0, 1, 1, 2, 2, 4, 4, 7, 8, 12, 14, 21, 24, 34, 41, 55, 66, 88, 105, 137, 165, 210, 253, 320, 383, 478, 574, 708, 847, 1039, 1238, 1507, 1794, 2167, 2573, 3094, 3660, 4378, 5170, 6153, 7245, 8591, 10087, 11914, 13959, 16424, 19196, 22519, 26252, 30701
OFFSET
0,5
COMMENTS
Also the number of partitions of n-1, n >= 2, such that the least part occurs exactly once. See A096373, A097091, A097092, A097093. - Robert G. Wilson v, Jul 24 2004 [Corrected by Wolfdieter Lang, Feb 18 2009]
Number of partitions of n+1 where the number of parts is itself a part. Take a partition of n (with k parts) which does not contain 1, remove 1 from each part and add a new part of size k+1. - Franklin T. Adams-Watters, May 01 2006
Number of partitions where the largest part occurs at least twice. - Joerg Arndt, Apr 17 2011
Row sums of triangle A147768. - Gary W. Adamson, Nov 11 2008
From Lewis Mammel (l_mammel(AT)att.net), Oct 06 2009: (Start)
a(n) is the number of sets of n disjoint pairs of 2n things, called a pairing, disjoint with a given pairing (A053871), that are unique under permutations preserving the given pairing.
Can be seen immediately from a graphical representation which must decompose into even numbered cycles of 4 or more things, as connected by pairs alternating between the pairings. Each thing is in a single cycle, so this is a partition of 2n into even parts greater than 2, equivalent to a partition of n into parts greater than 1. (End)
Convolution product (1, 1, 2, 2, 4, 4, ...) * (1, 2, 3, ...) = A058682 starting (1, 3, 7, 13, 23, 37, ...); with row sums of triangle A171239 = A058682. - Gary W. Adamson, Dec 05 2009
Also the number of 2-regular multigraphs with loops forbidden. - Jason Kimberley, Jan 05 2011
Number of appearances of the multiplicity n, n-1, ..., n-k in all partitions of n, for k < n/2. (Only populated by multiplicities of large numbers of 1's.) - William Keith, Nov 20 2011
Also the number of equivalence classes of n X n binary matrices with exactly 2 1's in each row and column, up to permutations of rows and columns (cf. A133687). - N. J. A. Sloane, Sep 16 2013
The q-Catalan numbers ((1-q)/(1-q^(n+1)))[2n,n]_q, where [2n,n]_q are the central q-binomial coefficients, match this sequence in their initial segment of length n. - William J. Keith, Nov 14 2013
Starting at a(2) this sequence gives the number of vertices on a nim tree created in the game of edge removal for a path P_{n} where n is the number of vertices on the path. This is the number of nonisomorphic graphs that can result from the path when the game of edge removal is played. - Lyndsey Wong, Jul 09 2016
The number of different ways to climb a staircase taking at least two stairs at a time. - Mohammad K. Azarian, Nov 20 2016
Let 1,0,1,1,1,... (offset 0) count unlabeled, connected, loopless 1-regular digraphs. This here is the Euler transform of that sequence, counting unlabeled loopless 1-regular digraphs. A145574 is the associated multiset transformation. A000166 are the labeled loopless 1-regular digraphs. - R. J. Mathar, Mar 25 2019
For n > 1, also the number of partitions with no part greater than the number of ones. - George Beck, May 09 2019 [See A187219 which is the correct sequence for this interpretation for n >= 1. - Spencer Miller, Jan 30 2023]
From Gus Wiseman, May 19 2019: (Start)
Conjecture: Also the number of integer partitions of n - 1 that have a consecutive subsequence summing to each positive integer from 1 to n - 1. For example, (32211) is such a partition because we have consecutive subsequences:
1: (1)
2: (2)
3: (3) or (21)
4: (22) or (211)
5: (32) or (221)
6: (2211)
7: (322)
8: (3221)
9: (32211)
(End)
There is a sufficient and necessary condition to characterize the partitions defined by Gus Wiseman. It is that the largest part must be less than or equal to the number of ones plus one. Hence, the number of partitions of n with no part greater than the number of ones is the same as the number of partitions of n-1 that have a consecutive subsequence summing to each integer from 1 to n-1. Gus Wiseman's conjecture can be proved bijectively. - Andrew Yezhou Wang, Dec 14 2019
From Peter Bala, Dec 01 2024: (Start)
Let P(2, n) denote the set of partitions of n into parts k > 1. Then A000041(n) = - Sum_{parts k in all partitions in P(2, n+2)} mu(k). For example, with n = 5, there are 4 partitions of n + 2 = 7 into parts greater than 1, namely, 7, 5 + 2, 4 + 3, 3 + 2 + 2, and mu(7) + (mu(5) + mu(2)) + (mu(4 ) + mu(3)) + (mu(3) + mu(2) + mu(2)) = -7 = - A000041(5). (End)
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 836.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 115, p*(n).
H. P. Robinson, Letter to N. J. A. Sloane, Jan 04 1974.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
P. G. Tait, Scientific Papers, Cambridge Univ. Press, Vol. 1, 1898, Vol. 2, 1900, see Vol. 1, p. 334.
LINKS
Andrew van den Hoeven, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
A. P. Akande et al., Computational study of non-unitary partitions, arXiv:2112.03264 [math.CO], 2021.
Colin Albert, Olivia Beckwith, Irfan Demetoglu, Robert Dicks, John H. Smith, and Jasmine Wang, Integer partitions with large Dyson rank, arXiv:2203.08987 [math.NT], 2022.
Max A. Alekseyev and Allan Bickle, Forbidden Subgraphs of Single Graphs, (2024). See p. 6.
Kevin Beanland and Hung Viet Chu, On Schreier-type Sets, Partitions, and Compositions, arXiv:2311.01926 [math.CO], 2023.
G. Dahl and T. A. Haufmann, Zero-one completely positive matrices and the A(R,S) classes, Preprint, 2016.
R. P. Gallant, G. Gunther, B. L. Hartnell, and D. F. Rall, A game of edge removal on graphs, JCMCC, 57 (2006), 75 - 82.
Edray Herber Goins and Talitha M. Washington, On the generalized climbing stairs problem, Ars Combin. 117 (2014), 183-190. MR3243840 (Reviewed), arXiv:0909.5459 [math.CO], 2009.
R. K. Guy and N. J. A. Sloane, Correspondence, 1988.
Wenwei Li, On the Number of Conjugate Classes of Derangements, arXiv:1612.08186 [math.CO], 2016.
J. L. Nicolas and A. Sárközy, On partitions without small parts, Journal de théorie des nombres de Bordeaux, 12 no. 1 (2000), p. 227-254.
R. A. Proctor, Let's Expand Rota's Twelvefold Way for Counting Partitions!, arXiv:math/0606404 [math.CO], 2006-2007.
Noah Rubin, Curtis Bright, Kevin K. H. Cheung, and Brett Stevens, Integer and Constraint Programming Revisited for Mutually Orthogonal Latin Squares, arXiv:2103.11018 [cs.DM], 2021.
Miloslav Znojil, Quantum phase transitions mediated by clustered non-Hermitian degeneracies, arXiv:2102.12272 [quant-ph], 2021.
FORMULA
G.f.: Product_{m>1} 1/(1-x^m).
a(0)=1, a(n) = p(n) - p(n-1), n >= 1, with the partition numbers p(n) := A000041(n).
a(n) = A085811(n+3). - James A. Sellers, Dec 06 2005 [Corrected by Gionata Neri, Jun 14 2015]
a(n) = A116449(n) + A116450(n). - Reinhard Zumkeller, Feb 16 2006
a(n) = Sum_{k=2..floor((n+2)/2)} A008284(n-k+1,k-1) for n > 0. - Reinhard Zumkeller, Nov 04 2007
G.f.: 1 + Sum_{n>=2} x^n / Product_{k>=n} (1 - x^k). - Joerg Arndt, Apr 13 2011
G.f.: Sum_{n>=0} x^(2*n) / Product_{k=1..n} (1 - x^k). - Joerg Arndt, Apr 17 2011
a(n) = A090824(n,1) for n > 0. - Reinhard Zumkeller, Oct 10 2012
a(n) ~ Pi * exp(sqrt(2*n/3)*Pi) / (12*sqrt(2)*n^(3/2)) * (1 - (3*sqrt(3/2)/Pi + 13*Pi/(24*sqrt(6)))/sqrt(n) + (217*Pi^2/6912 + 9/(2*Pi^2) + 13/8)/n). - Vaclav Kotesovec, Feb 26 2015, extended Nov 04 2016
G.f.: exp(Sum_{k>=1} (sigma_1(k) - 1)*x^k/k). - Ilya Gutkovskiy, Aug 21 2018
a(0) = 1, a(n) = A232697(n) - 1. - George Beck, May 09 2019
From Peter Bala, Feb 19 2021: (Start)
G.f.: A(q) = Sum_{n >= 0} q^(n^2)/( (1 - q)*Product_{k = 2..n} (1 - q^k)^2 ).
More generally, A(q) = Sum_{n >= 0} q^(n*(n+r))/( (1 - q) * Product_{k = 2..n} (1 - q^k)^2 * Product_{i = 1..r} (1 - q^(n+i)) ) for r = 0,1,2,.... (End)
G.f.: 1 + Sum_{n >= 1} x^(n+1)/Product_{k = 1..n-1} 1 - x^(k+2). - Peter Bala, Dec 01 2024
EXAMPLE
a(6) = 4 from 6 = 4+2 = 3+3 = 2+2+2.
G.f. = 1 + x^2 + x^3 + 2*x^4 + 2*x^5 + 4*x^6 + 4*x^7 + 7*x^8 + 8*x^9 + ...
From Gus Wiseman, May 19 2019: (Start)
The a(2) = 1 through a(9) = 8 partitions not containing 1 are the following. The Heinz numbers of these partitions are given by A005408.
(2) (3) (4) (5) (6) (7) (8) (9)
(22) (32) (33) (43) (44) (54)
(42) (52) (53) (63)
(222) (322) (62) (72)
(332) (333)
(422) (432)
(2222) (522)
(3222)
The a(2) = 1 through a(9) = 8 partitions of n - 1 whose least part appears exactly once are the following. The Heinz numbers of these partitions are given by A247180.
(1) (2) (3) (4) (5) (6) (7) (8)
(21) (31) (32) (42) (43) (53)
(41) (51) (52) (62)
(221) (321) (61) (71)
(331) (332)
(421) (431)
(2221) (521)
(3221)
The a(2) = 1 through a(9) = 8 partitions of n + 1 where the number of parts is itself a part are the following. The Heinz numbers of these partitions are given by A325761.
(21) (22) (32) (42) (52) (62) (72) (82)
(311) (321) (322) (332) (333) (433)
(331) (431) (432) (532)
(4111) (4211) (531) (631)
(4221) (4222)
(4311) (4321)
(51111) (4411)
(52111)
The a(2) = 1 through a(8) = 7 partitions of n whose greatest part appears at least twice are the following. The Heinz numbers of these partitions are given by A070003.
(11) (111) (22) (221) (33) (331) (44)
(1111) (11111) (222) (2221) (332)
(2211) (22111) (2222)
(111111) (1111111) (3311)
(22211)
(221111)
(11111111)
Nonisomorphic representatives of the a(2) = 1 through a(6) = 4 2-regular multigraphs with n edges and n vertices are the following.
{12,12} {12,13,23} {12,12,34,34} {12,12,34,35,45} {12,12,34,34,56,56}
{12,13,24,34} {12,13,24,35,45} {12,12,34,35,46,56}
{12,13,23,45,46,56}
{12,13,24,35,46,56}
The a(2) = 1 through a(9) = 8 partitions of n with no part greater than the number of ones are the following. The Heinz numbers of these partitions are given by A325762.
(11) (111) (211) (2111) (2211) (22111) (22211) (33111)
(1111) (11111) (3111) (31111) (32111) (222111)
(21111) (211111) (41111) (321111)
(111111) (1111111) (221111) (411111)
(311111) (2211111)
(2111111) (3111111)
(11111111) (21111111)
(111111111)
(End)
MAPLE
with(combstruct): ZL1:=[S, {S=Set(Cycle(Z, card>1))}, unlabeled]: seq(count(ZL1, size=n), n=0..50); # Zerinvary Lajos, Sep 24 2007
G:= {P=Set (Set (Atom, card>1))}: combstruct[gfsolve](G, unlabeled, x): seq (combstruct[count] ([P, G, unlabeled], size=i), i=0..50); # Zerinvary Lajos, Dec 16 2007
with(combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, unlabeled]; end: A:=a(2):seq(count(A, size=n), n=0..50); # Zerinvary Lajos, Jun 11 2008
# alternative Maple program:
A002865:= proc(n) option remember; `if`(n=0, 1, add(
(numtheory[sigma](j)-1)*A002865(n-j), j=1..n)/n)
end:
seq(A002865(n), n=0..60); # Alois P. Heinz, Sep 17 2017
MATHEMATICA
Table[ PartitionsP[n + 1] - PartitionsP[n], {n, -1, 50}] (* Robert G. Wilson v, Jul 24 2004 *)
f[1, 1] = 1; f[n_, k_] := f[n, k] = If[n < 0, 0, If[k > n, 0, If[k == n, 1, f[n, k + 1] + f[n - k, k]]]]; Table[ f[n, 2], {n, 50}] (* Robert G. Wilson v *)
Table[SeriesCoefficient[Exp[Sum[x^(2*k)/(k*(1 - x^k)), {k, 1, n}]], {x, 0, n}], {n, 0, 50}] (* Vaclav Kotesovec, Aug 18 2018 *)
CoefficientList[Series[1/QPochhammer[x^2, x], {x, 0, 50}], x] (* G. C. Greubel, Nov 03 2019 *)
Table[Count[IntegerPartitions[n], _?(FreeQ[#, 1]&)], {n, 0, 50}] (* Harvey P. Dale, Feb 12 2023 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x) / eta(x + x * O(x^n)), n))};
(PARI) a(n)=if(n, numbpart(n)-numbpart(n-1), 1) \\ Charles R Greathouse IV, Nov 26 2012
(Magma) A41 := func<n|n ge 0 select NumberOfPartitions(n) else 0>; [A41(n)-A41(n-1):n in [0..50]]; // Jason Kimberley, Jan 05 2011
(GAP) Concatenation([1], List([1..41], n->NrPartitions(n)-NrPartitions(n-1))); # Muniru A Asiru, Aug 20 2018
(SageMath)
def A002865_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/product((1-x^(m+2)) for m in (0..60)) ).list()
A002865_list(50) # G. C. Greubel, Nov 03 2019
(Python)
from sympy import npartitions
def A002865(n): return npartitions(n)-npartitions(n-1) if n else 1 # Chai Wah Wu, Mar 30 2023
CROSSREFS
First differences of partition numbers A000041. Cf. A053445, A072380, A081094, A081095, A232697.
Pairwise sums seem to be in A027336.
Essentially the same as A085811.
A column of A090824 and of A133687 and of A292508 and of A292622. Cf. A229161.
2-regular not necessarily connected graphs: A008483 (simple graphs), A000041 (multigraphs with loops allowed), this sequence (multigraphs with loops forbidden), A027336 (graphs with loops allowed but no multiple edges). - Jason Kimberley, Jan 05 2011
See also A098743 (parts that do not divide n).
Numbers n such that in the edge-delete game on the path P_{n} the first player does not have a winning strategy: A274161. - Lyndsey Wong, Jul 09 2016
Row sums of characteristic array A145573.
Number of partitions of n into parts >= m: A008483 (m = 3), A008484 (m = 4), A185325 - A185329 (m = 5 through 9).
KEYWORD
nonn,easy,nice
STATUS
approved
Number of compositions of n such that every distinct consecutive subsequence has a different sum.
+10
57
1, 1, 2, 4, 5, 10, 12, 24, 26, 47, 50, 96, 104, 172, 188, 322, 335, 552, 590, 938, 1002, 1612, 1648, 2586, 2862, 4131, 4418, 6718, 7122, 10332, 11166, 15930, 17446, 24834, 26166, 37146, 41087, 55732, 59592, 84068, 89740, 122106, 133070, 177876, 194024, 262840, 278626
OFFSET
0,3
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
Compare to the definition of knapsack partitions (A108917).
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..100
EXAMPLE
The distinct consecutive subsequences of (1,4,4,3) together with their sums are:
1: {1}
3: {3}
4: {4}
5: {1,4}
7: {4,3}
8: {4,4}
9: {1,4,4}
11: {4,4,3}
12: {1,4,4,3}
Because the sums are all different, (1,4,4,3) is counted under a(12).
The a(1) = 1 through a(6) = 12 compositions:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(1111) (41) (42)
(113) (51)
(122) (114)
(221) (132)
(311) (222)
(11111) (231)
(411)
(111111)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], UnsameQ@@Total/@Union[ReplaceList[#, {___, s__, ___}:>{s}]]&]], {n, 0, 15}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 13 2019
EXTENSIONS
a(21)-a(22) from Jinyuan Wang, Jun 20 2020
a(23)-a(25) from Robert Price, Jun 19 2021
a(26)-a(46) from Fausto A. C. Cariboni, Feb 10 2022
STATUS
approved
Heinz numbers of complete integer partitions.
+10
55
1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 72, 80, 84, 90, 96, 100, 108, 112, 120, 126, 128, 132, 140, 144, 150, 160, 162, 168, 176, 180, 192, 198, 200, 210, 216, 220, 224, 234, 240, 252, 256, 260, 264, 270, 280, 288, 294, 300
OFFSET
1,2
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
The sum of prime indices of n is A056239(n). A number is in this sequence iff its divisors have sums of prime indices covering an initial interval of nonnegative integers. For example, the divisors of 60 are {1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60}, with respective sums of prime indices {0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7}, so 60 is in the sequence.
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
4: {1,1}
6: {1,2}
8: {1,1,1}
12: {1,1,2}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
24: {1,1,1,2}
30: {1,2,3}
32: {1,1,1,1,1}
36: {1,1,2,2}
40: {1,1,1,3}
42: {1,2,4}
48: {1,1,1,1,2}
54: {1,2,2,2}
56: {1,1,1,4}
60: {1,1,2,3}
64: {1,1,1,1,1,1}
MATHEMATICA
normQ[m_]:=Or[m=={}, Union[m]==Range[Max[m]]];
hwt[n_]:=Total[Cases[FactorInteger[n], {p_, k_}:>PrimePi[p]*k]];
Select[Range[1000], normQ[hwt/@Rest[Divisors[#]]]&]
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 21 2019
STATUS
approved
Length of shortest (or optimal) Golomb ruler with n marks.
(Formerly M2540)
+10
49
1, 3, 6, 11, 17, 25, 34, 44, 55, 72, 85, 106, 127, 151, 177, 199, 216, 246, 283, 333, 356, 372, 425, 480, 492, 553, 585
OFFSET
2,2
COMMENTS
a(n) is the least integer such that there is an n-element set of integers between 0 and a(n), the sums of pairs (of not necessarily distinct elements) of which are distinct.
From David W. Wilson, Aug 17 2007: (Start)
An n-mark Golomb ruler has a unique integer distance between any pair of marks and thus measures n(n-1)/2 distinct integer distances.
An optimal n-mark Golomb ruler has the smallest possible length (distance between the two end marks) for an n-mark ruler.
A perfect n-mark Golomb ruler has length exactly n(n-1)/2 and measures each distance from 1 to n(n-1)/2. (End)
Positions where A143824 increases (see also A227590). - N. J. A. Sloane, Apr 08 2016
From Gus Wiseman, May 17 2019: (Start)
Also the smallest m such that there exists a length-n composition of m for which every restriction to a subinterval has a different sum. Representatives of compositions for the first few terms are:
0: ()
1: (1)
3: (2,1)
6: (2,3,1)
11: (3,1,5,2)
17: (4,2,3,7,1)
Representatives of corresponding Golomb rulers are:
{0}
{0,1}
{0,2,3}
{0,2,5,6}
{0,3,4,9,11}
{0,4,6,9,16,17}
(End)
REFERENCES
CRC Handbook of Combinatorial Designs, 1996, p. 315.
A. K. Dewdney, Computer Recreations, Scientific Amer. 253 (No. 6, Jun), 1985, pp. 16ff; 254 (No. 3, March), 1986, pp. 20ff.
S. W. Golomb, How to number a graph, pp. 23-37 of R. C. Read, editor, Graph Theory and Computing. Academic Press, NY, 1972.
Richard K. Guy, Unsolved Problems in Number Theory (2nd edition), Springer-Verlag (1994), Section C10.
A. Kotzig and P. J. Laufer, Sum triangles of natural numbers having minimum top, Ars. Combin. 21 (1986), 5-13.
Miller, J. C. P., Difference bases. Three problems in additive number theory. Computers in number theory (Proc. Sci. Res. Council Atlas Sympos. No. 2, Oxford, 1969), pp. 299--322. Academic Press, London,1971. MR0316269 (47 #4817)
Rhys Price Jones, Gracelessness, Proc. 10th S.-E. Conf. Combin., Graph Theory and Computing, 1979, pp. 547-552.
Ana Salagean, David Gardner and Raphael Phan, Index Tables of Finite Fields and Modular Golomb Rulers, in Sequences and Their Applications - SETA 2012, Lecture Notes in Computer Science. Volume 7280, 2012, pp. 136-147.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
A. K. Dewdney, Computer Recreations, Scientific Amer. 253 (No. 6, Jun), 1985, pp. 16ff; 254 (No. 3, March), 1986, pp. 20ff. [Annotated scanned copy]
Distributed.Net, Project OGR
Kent Freeman, Unpublished notes. [Scanned copy]
Michael Geißer, Theresa Körner, Sascha Kurz, and Anne Zahn, Squares with three digits, arXiv:2112.00444 [math.NT], 2021.
A. Kotzig and P. J. Laufer, Sum triangles of natural numbers having minimum top, Ars. Combin. 21 (1986), 5-13. [Annotated scanned copy]
Joseph Malkevitch, Weird Rulers.
G. Martin and K. O'Bryant, Constructions of generalized Sidon sets, arXiv:math/0408081 [math.NT], 2004-2005.
L. Miller, Golomb Rulers
K. O'Bryant, Sets of Natural Numbers with Proscribed Subsets, J. Int. Seq. 18 (2015) # 15.7.7
W. Schneider, Golomb Rulers
J. B. Shearer, Golomb ruler table
David Singmaster, David Fielker, N. J. A. Sloane, Correspondence, August 1979
Eric Weisstein's World of Mathematics, Golomb Ruler.
Wikipedia, Golomb ruler
FORMULA
a(n) >= n(n-1)/2, with strict inequality for n >= 5 (Golomb). - David W. Wilson, Aug 18 2007
EXAMPLE
a(5)=11 because 0-1-4-9-11 (0-2-7-10-11) resp. 0-3-4-9-11 (0-2-7-8-11) are shortest: there is no b0-b1-b2-b3-b4 with different distances |bi-bj| and max. |bi-bj| < 11.
MATHEMATICA
Min@@Total/@#&/@GatherBy[Select[Join@@Permutations/@Join@@Table[IntegerPartitions[i], {i, 0, 15}], UnsameQ@@ReplaceList[#, {___, s__, ___}:>Plus[s]]&], Length] (* Gus Wiseman, May 17 2019 *)
PROG
(Python)
from itertools import combinations, combinations_with_replacement, count
def a(n):
for k in count(n-1):
for c in combinations(range(k), n-1):
c = c + (k, )
ss = set()
for s in combinations_with_replacement(c, 2):
if sum(s) in ss: break
else: ss.add(sum(s))
if len(ss) == n*(n+1)//2: return k # Jianing Song, Feb 14 2025, adapted from the python program of A345731
CROSSREFS
See A106683 for triangle of marks.
0-1-4-9-11 corresponds to 1-3-5-2 in A039953: 0+1+3+5+2=11
A row or column of array in A234943.
Adding 1 to these terms gives A227590. Cf. A143824.
For first differences see A270813.
KEYWORD
nonn,hard,nice,more,changed
EXTENSIONS
425 sent by Ed Pegg Jr, Nov 15 2004
a(25), a(26) proved by OGR-25 and OGR-26 projects, added by Max Alekseyev, Sep 29 2010
a(27) proved by OGR-27, added by David Consiglio, Jr., Jun 09 2014
a(28) proved by OGR-28, added by David Consiglio, Jr., Jan 19 2023
STATUS
approved
Number of Golomb rulers of length n.
+10
49
1, 1, 3, 3, 5, 7, 13, 15, 27, 25, 45, 59, 89, 103, 163, 187, 281, 313, 469, 533, 835, 873, 1319, 1551, 2093, 2347, 3477, 3881, 5363, 5871, 8267, 9443, 12887, 14069, 19229, 22113, 29359, 32229, 44127, 48659, 64789, 71167, 94625, 105699, 139119, 151145, 199657
OFFSET
1,3
COMMENTS
Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?
Leading entry in row n of triangle in A169940. Also the number of Sidon sets A with min(A) = 0 and max(A) = n. Odd for all n since {0,n} is the only symmetric Golomb ruler, and reversal preserves the Golomb property. Bounded from above by A032020 since the ruler {0 < r_1 < ... < r_t < n} gives rise to a composition of n: (r_1 - 0, r_2 - r_1, ... , n - r_t) with distinct parts. - Tomas Boothby, May 15 2012
Also the number of compositions of n such that every restriction to a subinterval has a different sum. This is a stronger condition than all distinct consecutive subsequences having a different sum (cf. A325676). - Gus Wiseman, May 16 2019
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 1..99
T. Pham, Enumeration of Golomb Rulers (Master's thesis), San Francisco State U., 2011.
Eric Weisstein's World of Mathematics, Golomb Ruler.
FORMULA
a(n) = A169952(n) - A169952(n-1) for n>1. - Andrew Howroyd, Jul 09 2017
EXAMPLE
For n=2, there is one Golomb Ruler: {0,2}. For n=3, there are three: {0,3}, {0,1,3}, {0,2,3}. - Tomas Boothby, May 15 2012
From Gus Wiseman, May 16 2019: (Start)
The a(1) = 1 through a(8) = 15 compositions such that every restriction to a subinterval has a different sum:
(1) (2) (3) (4) (5) (6) (7) (8)
(12) (13) (14) (15) (16) (17)
(21) (31) (23) (24) (25) (26)
(32) (42) (34) (35)
(41) (51) (43) (53)
(132) (52) (62)
(231) (61) (71)
(124) (125)
(142) (143)
(214) (152)
(241) (215)
(412) (251)
(421) (341)
(512)
(521)
(End)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], UnsameQ@@ReplaceList[#, {___, s__, ___}:>Plus[s]]&]], {n, 15}] (* Gus Wiseman, May 16 2019 *)
PROG
(Sage)
def A169942(n):
R = QQ['x']
return sum(1 for c in cartesian_product([[0, 1]]*n) if max(R([1] + list(c) + [1])^2) == 2)
[A169942(n) for n in range(1, 8)]
# Tomas Boothby, May 15 2012
CROSSREFS
Related to thickness: A169940-A169954, A061909.
Related to Golomb rulers: A036501, A054578, A143823.
Row sums of A325677.
KEYWORD
nonn,changed
AUTHOR
N. J. A. Sloane, Aug 01 2010
EXTENSIONS
a(15)-a(30) from Nathaniel Johnston, Nov 12 2011
a(31)-a(50) from Tomas Boothby, May 15 2012
STATUS
approved
The number of n-full sets, F(n).
+10
45
1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 2, 1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 10, 13, 14, 17, 20, 25, 28, 34, 40, 46, 54, 62, 69, 80, 90, 102, 115, 131, 144, 167, 186, 213, 239, 273, 304, 349, 388, 441, 495, 563, 625, 710, 790, 890, 990, 1114, 1232, 1387, 1530, 1713, 1894, 2119, 2330, 2605, 2866, 3192, 3512, 3910, 4289, 4774, 5237, 5809, 6377, 7068, 7739
OFFSET
0,13
COMMENTS
Let A be a set of positive integers. We say that A is n-full if (sum A)=[n] for a positive integer n, where (sum A) is the set of all positive integers which are a sum of distinct elements of A and [n]={1,2,...,n}. Then F(n) denotes the number of n-full sets.
Also the number of distinct and complete partitions of n, by definition, which are counted by A000009 and A126796. - George Beck, Nov 06 2017
An integer partition of n is complete (see also A325781) if every number from 0 to n is the sum of some submultiset of the parts. The Heinz numbers of these partitions are given by A325986. - Gus Wiseman, May 31 2019
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (terms n=1..1000 from Reinhard Zumkeller)
Mohammad Saleh Dinparvar, Python program
L. Naranjani and M. Mirzavaziri, Full Subsets of N, Journal of Integer Sequences, 14 (2011), Article 11.5.3.
FORMULA
F(n) = Sum_(i=L(n) .. U(n), F(n,i)), where F(n,i) = Sum_(j=L(n-i) .. min(U(n-i),i-1), F(n-i,j) ) and L(n), U(n) are defined in A188429 and A188430, respectively.
G.f.: 1 = Sum_{n>=0} a(n)*x^n / Product_{k=1..n+1} (1+x^k), with a(0)=1. - Paul D. Hanna, Mar 08 2012
a(n) ~ c * exp(Pi*sqrt(n/3)) / n^(3/4), where c = 0.03316508... - Vaclav Kotesovec, Oct 21 2019
EXAMPLE
a(26) = 10, because there are 10 26-full sets: {1,2,4,5,6,8}, {1,2,3,5,7,8}, {1,2,3,5,6,9}, {1,2,3,4,7,9}, {1,2,3,4,6,10}, {1,2,3,4,5,11}, {1,2,4,8,11}, {1,2,4,7,12}, {1,2,4,6,13}, {1,2,3,7,13}.
G.f.: 1 = 1/(1+x) + 1*x/((1+x)*(1+x^2)) + 0*x^2/((1+x)*(1+x^2)*(1+x^3)) + 1*x^3/((1+x)*(1+x^2)*(1+x^3)*(1+x^4)) +...+ a(n)*x^n / Product_{k=1..n+1} (1+x^k) +...
MAPLE
sums:= proc(s) local i, m;
m:= max(s[]);
`if`(m<1, {}, {m, seq([i, i+m][], i=sums(s minus {m}))})
end:
a:= proc(n) local b;
b:= proc(i, s) local si;
if i=1 then `if`(sums(s)={$1..n}, 1, 0)
else si:= s union {i};
b(i-1, s)+ `if`(max(sums(si)[])>n, 0, b(i-1, si))
fi
end; b(n, {1})
end:
seq(a(n), n=1..40); # Alois P. Heinz, Apr 03 2011
# second Maple program:
b:= proc(n, i) option remember; `if`(i*(i+1)/2<n, 0, `if`(n=0, 1,
b(n, i-1)+`if`(i>n or i>n-i+1, 0, b(n-i, i-1))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..80); # Alois P. Heinz, May 20 2017
MATHEMATICA
Sums[s_] := Sums[s] = With[{m = Max[s]}, If[m < 1, {}, Union @ Flatten @ Join[{m}, Table[{i, i + m}, {i, Sums[s ~Complement~ {m}]}]]]];
a[n_] := Module[{b}, b[i_, s_] := b[i, s] = Module[{si}, If[i == 1, If[Sums[s] == Range[n], 1, 0], si = s ~Union~ {i}; b[i-1, s] + If[Max[ Sums[si]] > n, 0, b[i - 1, si]]]]; b[n, {1}]];
Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 80}] (* Jean-François Alcover, Apr 12 2017, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Union[Total/@Union[Subsets[#]]]==Range[0, n]&]], {n, 30}] (* Gus Wiseman, May 31 2019 *)
PROG
(PARI) /* As coefficients in g.f. */
{a(n)=local(A=[1]); for(i=1, n+1, A=concat(A, 0); A[#A]=polcoeff(1 - sum(m=1, #A, A[m]*x^m/prod(k=1, m, 1+x^k +x*O(x^#A) )), #A) ); A[n+1]}
for(n=0, 50, print1(a(n), ", ")) /* Paul D. Hanna, Mar 06 2012 */
(Haskell)
import Data.MemoCombinators (memo2, integral, Memo)
a188431 n = a188431_list !! (n-1)
a188431_list = map
(\x -> sum [fMemo x i | i <- [a188429 x .. a188430 x]]) [1..] where
fMemo = memo2 integral integral f
f _ 1 = 1
f m i = sum [fMemo (m - i) j |
j <- [a188429 (m - i) .. min (a188430 (m - i)) (i - 1)]]
-- Reinhard Zumkeller, Aug 06 2015
KEYWORD
nonn
AUTHOR
Madjid Mirzavaziri, Mar 31 2011
EXTENSIONS
More terms from Alois P. Heinz, Apr 03 2011
a(0)=1 prepended by Alois P. Heinz, May 20 2017
STATUS
approved
Number of complete subsets of {1..n}.
+10
41
1, 2, 3, 4, 6, 9, 15, 27, 50, 95, 185, 365, 724, 1441, 2873, 5735, 11458, 22902, 45789, 91561, 183102, 366180, 732331, 1464626, 2929209, 5858367, 11716674, 23433277, 46866473, 93732852, 187465596, 374931067, 749861989, 1499723808, 2999447418
OFFSET
0,2
COMMENTS
A set of positive integers summing to n is complete if every nonnegative integer up to n is the sum of some subset.
LINKS
Andrzej Kukla and Piotr Miska, On practical sets and A-practical numbers, arXiv:2405.18225 [math.NT], 2024.
EXAMPLE
The a(0) = 1 through a(6) = 15 subsets:
{} {} {} {} {} {} {}
{1} {1} {1} {1} {1} {1}
{1,2} {1,2} {1,2} {1,2} {1,2}
{1,2,3} {1,2,3} {1,2,3} {1,2,3}
{1,2,4} {1,2,4} {1,2,4}
{1,2,3,4} {1,2,3,4} {1,2,3,4}
{1,2,3,5} {1,2,3,5}
{1,2,4,5} {1,2,3,6}
{1,2,3,4,5} {1,2,4,5}
{1,2,4,6}
{1,2,3,4,5}
{1,2,3,4,6}
{1,2,3,5,6}
{1,2,4,5,6}
{1,2,3,4,5,6}
MATHEMATICA
Table[Length[Select[Subsets[Range[n]], Union[Plus@@@Subsets[#]]==Range[0, Total[#]]&]], {n, 0, 10}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 04 2019
EXTENSIONS
a(17)-a(34) from Charlie Neder, Jun 05 2019
STATUS
approved
Number of distinct positive consecutive subsequence-sums of the k-th composition in standard order.
+10
40
0, 1, 1, 2, 1, 3, 3, 3, 1, 3, 2, 4, 3, 4, 4, 4, 1, 3, 3, 5, 3, 5, 4, 5, 3, 4, 5, 5, 5, 5, 5, 5, 1, 3, 3, 5, 2, 5, 5, 6, 3, 6, 3, 6, 5, 6, 5, 6, 3, 4, 6, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 1, 3, 3, 5, 3, 6, 6, 7, 3, 5, 5, 7, 4, 6, 6, 7, 3, 6, 4, 7, 5, 7, 6
OFFSET
0,4
COMMENTS
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again.
FORMULA
a(n) = A333257(n) - 1.
EXAMPLE
The composition (4,3,1,2) has positive subsequence-sums 1, 2, 3, 4, 6, 7, 8, 10, so a(550) = 8.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Length[Union[ReplaceList[stc[n], {___, s__, ___}:>Plus[s]]]], {n, 0, 100}]
CROSSREFS
Dominated by A124770.
Compositions where every subinterval has a different sum are counted by A169942 and A325677 and ranked by A333222. The case of partitions is counted by A325768 and ranked by A325779.
Positive subset-sums of partitions are counted by A276024 and A299701.
Knapsack partitions are counted by A108917 and A325592 and ranked by A299702.
Strict knapsack partitions are counted by A275972 and ranked by A059519 and A301899.
Knapsack compositions are counted by A325676 and A325687 and ranked by A333223. The case of partitions is counted by A325769 and ranked by A325778, for which the number of distinct consecutive subsequences is given by A325770.
Allowing empty subsequences gives A333257.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 18 2020
STATUS
approved
Numbers k such that every distinct consecutive subsequence of the k-th composition in standard order has a different sum.
+10
26
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 17, 18, 19, 20, 21, 24, 26, 28, 31, 32, 33, 34, 35, 36, 40, 41, 42, 48, 50, 56, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 80, 81, 84, 85, 88, 96, 98, 100, 104, 106, 112, 120, 127, 128, 129, 130, 131, 132, 133
OFFSET
1,3
COMMENTS
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again.
EXAMPLE
The list of terms together with the corresponding compositions begins:
0: () 21: (2,2,1) 65: (6,1)
1: (1) 24: (1,4) 66: (5,2)
2: (2) 26: (1,2,2) 67: (5,1,1)
3: (1,1) 28: (1,1,3) 68: (4,3)
4: (3) 31: (1,1,1,1,1) 69: (4,2,1)
5: (2,1) 32: (6) 70: (4,1,2)
6: (1,2) 33: (5,1) 71: (4,1,1,1)
7: (1,1,1) 34: (4,2) 72: (3,4)
8: (4) 35: (4,1,1) 73: (3,3,1)
9: (3,1) 36: (3,3) 74: (3,2,2)
10: (2,2) 40: (2,4) 80: (2,5)
12: (1,3) 41: (2,3,1) 81: (2,4,1)
15: (1,1,1,1) 42: (2,2,2) 84: (2,2,3)
16: (5) 48: (1,5) 85: (2,2,2,1)
17: (4,1) 50: (1,3,2) 88: (2,1,4)
18: (3,2) 56: (1,1,4) 96: (1,6)
19: (3,1,1) 63: (1,1,1,1,1,1) 98: (1,4,2)
20: (2,3) 64: (7) 100: (1,3,3)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], UnsameQ@@Total/@Union[ReplaceList[stc[#], {___, s__, ___}:>{s}]]&]
CROSSREFS
Distinct subsequences are counted by A124770 and A124771.
A superset of A333222, counted by A169942, with partition case A325768.
These compositions are counted by A325676.
A version for partitions is A325769, with Heinz numbers A325778.
The number of distinct positive subsequence-sums is A333224.
The number of distinct subsequence-sums is A333257.
Numbers whose binary indices are a strict knapsack partition are A059519.
Knapsack partitions are counted by A108917, with strict case A275972.
Golomb subsets are counted by A143823.
Heinz numbers of knapsack partitions are A299702.
Maximal Golomb rulers are counted by A325683.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 17 2020
STATUS
approved
Number of maximal Golomb rulers of length n.
+10
24
1, 1, 1, 2, 2, 4, 2, 6, 8, 18, 16, 24, 20, 28, 42, 76, 100, 138, 168, 204, 194, 272, 276, 450, 588, 808, 992, 1578, 1612, 1998, 2166, 2680, 2732, 3834, 3910, 5716, 6818, 9450, 10524, 15504, 16640, 22268, 23754, 30430, 31498, 40644, 40294, 52442, 56344, 72972, 77184
OFFSET
0,4
COMMENTS
A Golomb ruler of length n is a subset of {0..n} containing 0 and n and such that every pair of distinct terms has a different difference up to sign.
Also the number of minimal (most refined) compositions of n such that every restriction to a subinterval has a different sum.
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..100
Eric Weisstein's World of Mathematics, Golomb Ruler.
EXAMPLE
The a(1) = 1 through a(8) = 8 maximal Golomb rulers:
{0,1} {0,2} {0,1,3} {0,1,4} {0,1,5} {0,1,4,6} {0,1,3,7} {0,1,3,8}
{0,2,3} {0,3,4} {0,2,5} {0,2,5,6} {0,1,5,7} {0,1,5,8}
{0,3,5} {0,2,3,7} {0,1,6,8}
{0,4,5} {0,2,6,7} {0,2,3,8}
{0,4,5,7} {0,2,7,8}
{0,4,6,7} {0,3,7,8}
{0,5,6,8}
{0,5,7,8}
The a(1) = 1 through a(10) = 16 minimal compositions:
(1) (2) (12) (13) (14) (132) (124) (125) (126) (127)
(21) (31) (23) (231) (142) (143) (135) (136)
(32) (214) (152) (153) (154)
(41) (241) (215) (162) (163)
(412) (251) (216) (172)
(421) (341) (234) (217)
(512) (243) (253)
(521) (261) (271)
(315) (316)
(324) (352)
(342) (361)
(351) (451)
(423) (613)
(432) (631)
(513) (712)
(531) (721)
(612)
(621)
MATHEMATICA
fasmax[y_]:=Complement[y, Union@@(Most[Subsets[#]]&/@y)];
Table[Length[fasmax[Accumulate/@Select[Join@@Permutations/@IntegerPartitions[n], UnsameQ@@ReplaceList[#, {___, s__, ___}:>Plus[s]]&]]], {n, 0, 15}]
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Gus Wiseman, May 13 2019
EXTENSIONS
a(21)-a(50) from Fausto A. C. Cariboni, Feb 22 2022
STATUS
approved

Search completed in 0.027 seconds