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 74 results. Next

A003022 Length of shortest (or optimal) Golomb ruler with n marks.

Original entry on oeis.org

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

Views

Author

Keywords

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)

Examples

			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.
		

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).

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.

Programs

  • 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 *)
  • 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

Formula

a(n) >= n(n-1)/2, with strict inequality for n >= 5 (Golomb). - David W. Wilson, Aug 18 2007

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

A169942 Number of Golomb rulers of length n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

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

Examples

			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)
		

Crossrefs

Related to thickness: A169940-A169954, A061909.
Related to Golomb rulers: A036501, A054578, A143823.
Row sums of A325677.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@ReplaceList[#,{_,s__,_}:>Plus[s]]&]],{n,15}] (* Gus Wiseman, May 16 2019 *)
  • 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

Formula

a(n) = A169952(n) - A169952(n-1) for n>1. - Andrew Howroyd, Jul 09 2017

Extensions

a(15)-a(30) from Nathaniel Johnston, Nov 12 2011
a(31)-a(50) from Tomas Boothby, May 15 2012

A103295 Number of complete rulers with length n.

Original entry on oeis.org

1, 1, 1, 3, 4, 9, 17, 33, 63, 128, 248, 495, 988, 1969, 3911, 7857, 15635, 31304, 62732, 125501, 250793, 503203, 1006339, 2014992, 4035985, 8080448, 16169267, 32397761, 64826967, 129774838, 259822143, 520063531, 1040616486, 2083345793, 4168640894, 8342197304, 16694070805, 33404706520, 66832674546, 133736345590
Offset: 0

Views

Author

Peter Luschny, Feb 28 2005

Keywords

Comments

For definitions, references and links related to complete rulers see A103294.
Also the number of compositions of n whose consecutive subsequence-sums cover an initial interval of the positive integers. For example, (2,3,1) is such a composition because (1), (2), (3), (3,1), (2,3), and (2,3,1) are subsequences with sums covering {1..6}. - Gus Wiseman, May 17 2019
a(n) ~ c*2^n, where 0.2427 < c < 0.2459. - Fei Peng, Oct 17 2019

Examples

			a(4) = 4 counts the complete rulers with length 4, {[0,2,3,4],[0,1,3,4],[0,1,2,4],[0,1,2,3,4]}.
		

Crossrefs

Cf. A103300 (Perfect rulers with length n). Main diagonal of A349976.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SubsetQ[ReplaceList[#,{_,s__,_}:>Plus[s]],Range[n]]&]],{n,0,15}] (* Gus Wiseman, May 17 2019 *)

Formula

a(n) = Sum_{i=0..n} A103294(n, i) = Sum_{i=A103298(n)..n} A103294(n, i).

Extensions

a(30)-a(36) from Hugo Pfoertner, Mar 17 2005
a(37)-a(38) from Hugo Pfoertner, Dec 10 2021
a(39) from Hugo Pfoertner, Dec 16 2021

A333224 Number of distinct positive consecutive subsequence-sums of the k-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 18 2020

Keywords

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.

Examples

			The composition (4,3,1,2) has positive subsequence-sums 1, 2, 3, 4, 6, 7, 8, 10, so a(550) = 8.
		

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.

Programs

  • 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}]

Formula

a(n) = A333257(n) - 1.

A196723 Number of subsets of {1..n} (including empty set) such that the pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 4, 8, 15, 28, 50, 86, 143, 236, 376, 594, 913, 1380, 2048, 3016, 4367, 6302, 8974, 12670, 17685, 24580, 33738, 46072, 62367, 83990, 112342, 149734, 198153, 261562, 343210, 448694, 583445, 756846, 976086, 1255658, 1607831, 2053186, 2610560, 3312040, 4183689
Offset: 0

Views

Author

Alois P. Heinz, Oct 06 2011

Keywords

Comments

The number of subsets of {1..n} such that every orderless pair of (not necessarily distinct) elements has a different sum is A143823(n).

Examples

			a(4) = 15: {}, {1}, {2}, {3}, {4}, {1,2}, {1,3}, {1,4}, {2,3}, {2,4}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}.
		

Crossrefs

The subset case is A196723 (this sequence).
The maximal case is A325878.
The integer partition case is A325857.
The strict integer partition case is A325877.
Heinz numbers of the counterexamples are given by A325991.

Programs

  • Maple
    b:= proc(n, s) local sn, m;
          m:= nops(s);
          sn:= [s[], n];
          `if`(n<1, 1, b(n-1, s) +`if`(m*(m+1)/2 = nops(({seq(seq(
           sn[i]+sn[j], j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
        end:
    a:= proc(n) option remember;
          b(n-1, [n]) +`if`(n=0, 0, a(n-1))
        end:
    seq(a(n), n=0..20);
  • Mathematica
    b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n<1, 1, b[n-1, s] + If[m*(m+1)/2 == Length[ Union[ Flatten[ Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i+1, m+1}]]]], b[n-1, sn], 0]]];
    a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 31 2017, translated from Maple *)
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[#,{2}]&]],{n,0,10}] (* Gus Wiseman, Jun 03 2019 *)

Extensions

Edited by Gus Wiseman, Jun 03 2019

A333223 Numbers k such that every distinct consecutive subsequence of the k-th composition in standard order has a different sum.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 17 2020

Keywords

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.

Examples

			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)
		

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.

Programs

  • 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}]]&]

A196724 Number of subsets of {1..n} (including empty set) such that the pairwise products of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 58, 116, 212, 416, 720, 1440, 2340, 4680, 7920, 13024, 23328, 46656, 74168, 148336, 229856, 371424, 615304, 1230608, 1780224, 3401568, 5589360, 9468504, 14397744, 28795488, 40312128, 80624256, 131388480, 206363168, 335814288, 521401536
Offset: 0

Views

Author

Alois P. Heinz, Oct 06 2011

Keywords

Comments

The number of subsets of {1..n} such that every orderless pair of (not necessarily distinct) elements has a different product is A325860(n). - Gus Wiseman, Jun 03 2019

Examples

			a(6) = 58: from the 2^6=64 subsets of {1,2,3,4,5,6} only 6 do not have all the pairwise products of elements distinct: {1,2,3,6}, {2,3,4,6}, {1,2,3,4,6}, {1,2,3,5,6}, {2,3,4,5,6}, {1,2,3,4,5,6}.
		

Crossrefs

The subset case is A196724 (this sequence).
The maximal case is A325859.
The integer partition case is A325856.
The strict integer partition case is A325855.
Heinz numbers of the counterexamples are given by A325993.

Programs

  • Maple
    b:= proc(n, s) local sn, m;
          m:= nops(s);
          sn:= [s[], n];
          `if`(n<1, 1, b(n-1, s) +`if`(m*(m+1)/2 = nops(({seq(seq(
           sn[i]*sn[j], j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
        end:
    a:= proc(n) option remember;
          b(n-1, [n]) +`if`(n=0, 0, a(n-1))
        end:
    seq(a(n), n=0..20);
  • Mathematica
    b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n < 1, 1, b[n - 1, s] + If[m*(m + 1)/2 == Length[Union[Flatten[Table[ sn[[i]] * sn[[j]], {i, 1, m}, {j, i + 1, m + 1}]]]], b[n - 1, sn], 0]]]; a[n_] := a[n] = b[n - 1, {n}] + If[n == 0, 0, a[n - 1]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 31 2017, translated from Maple *)
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Times@@@Subsets[#,{2}]&]],{n,0,10}] (* Gus Wiseman, Jun 03 2019 *)

Extensions

Name edited by Gus Wiseman, Jun 03 2019
a(33)-a(35) from Fausto A. C. Cariboni, Oct 05 2020

A325683 Number of maximal Golomb rulers of length n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 13 2019

Keywords

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.

Examples

			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)
		

Crossrefs

Programs

  • 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}]

Extensions

a(21)-a(50) from Fausto A. C. Cariboni, Feb 22 2022

A333222 Numbers k such that every restriction of the k-th composition in standard order to a subinterval has a different sum.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 12, 16, 17, 18, 20, 24, 32, 33, 34, 40, 41, 48, 50, 64, 65, 66, 68, 69, 70, 72, 80, 81, 88, 96, 98, 104, 128, 129, 130, 132, 133, 134, 144, 145, 160, 161, 176, 192, 194, 196, 208, 256, 257, 258, 260, 261, 262, 264, 265, 268, 272, 274
Offset: 1

Views

Author

Gus Wiseman, Mar 17 2020

Keywords

Comments

Also numbers whose binary indices together with 0 define a Golomb ruler.
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.

Examples

			The list of terms together with the corresponding compositions begins:
    0: ()        41: (2,3,1)    130: (6,2)      262: (6,1,2)
    1: (1)       48: (1,5)      132: (5,3)      264: (5,4)
    2: (2)       50: (1,3,2)    133: (5,2,1)    265: (5,3,1)
    4: (3)       64: (7)        134: (5,1,2)    268: (5,1,3)
    5: (2,1)     65: (6,1)      144: (3,5)      272: (4,5)
    6: (1,2)     66: (5,2)      145: (3,4,1)    274: (4,3,2)
    8: (4)       68: (4,3)      160: (2,6)      276: (4,2,3)
    9: (3,1)     69: (4,2,1)    161: (2,5,1)    288: (3,6)
   12: (1,3)     70: (4,1,2)    176: (2,1,5)    289: (3,5,1)
   16: (5)       72: (3,4)      192: (1,7)      290: (3,4,2)
   17: (4,1)     80: (2,5)      194: (1,5,2)    296: (3,2,4)
   18: (3,2)     81: (2,4,1)    196: (1,4,3)    304: (3,1,5)
   20: (2,3)     88: (2,1,4)    208: (1,2,5)    320: (2,7)
   24: (1,4)     96: (1,6)      256: (9)        321: (2,6,1)
   32: (6)       98: (1,4,2)    257: (8,1)      324: (2,4,3)
   33: (5,1)    104: (1,2,4)    258: (7,2)      328: (2,3,4)
   34: (4,2)    128: (8)        260: (6,3)      352: (2,1,6)
   40: (2,4)    129: (7,1)      261: (6,2,1)    384: (1,8)
		

Crossrefs

A subset of A233564.
Also a subset of A333223.
These compositions are counted by A169942 and A325677.
The number of distinct nonzero subsequence-sums is A333224.
The number of distinct subsequence-sums is A333257.
Lengths of optimal Golomb rulers are A003022.
Inequivalent optimal Golomb rulers are counted by A036501.
Complete rulers are A103295, with perfect case A103300.
Knapsack partitions are counted by A108917, with strict case A275972.
Distinct subsequences are counted by A124770 and A124771.
Golomb subsets are counted by A143823.
Heinz numbers of knapsack partitions are A299702.
Knapsack compositions are counted by A325676.
Maximal Golomb rulers are counted by A325683.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,300],UnsameQ@@ReplaceList[stc[#],{_,s__,_}:>Plus[s]]&]

A325677 Irregular triangle read by rows where T(n,k) is the number of Golomb rulers of length n with k + 1 marks, k > 0.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 1, 4, 2, 1, 6, 6, 1, 6, 8, 1, 8, 18, 1, 8, 16, 1, 10, 30, 4, 1, 10, 34, 14, 1, 12, 48, 28, 1, 12, 48, 42, 1, 14, 72, 76, 1, 14, 72, 100, 1, 16, 96, 160, 8, 1, 16, 98, 190, 8, 1, 18, 126, 284, 40, 1, 18, 128, 316, 70
Offset: 1

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

Also the number of length-k compositions of n such that every restriction to a subinterval has a different sum. A composition of n is a finite sequence of positive integers summing to n.

Examples

			Triangle begins:
   1
   1
   1   2
   1   2
   1   4
   1   4   2
   1   6   6
   1   6   8
   1   8  18
   1   8  16
   1  10  30   4
   1  10  34  14
   1  12  48  28
   1  12  48  42
   1  14  72  76
   1  14  72 100
   1  16  96 160   8
   1  16  98 190   8
   1  18 126 284  40
   1  18 128 316  70
Row n = 8 counts the following rulers:
  {0,8}  {0,1,8}  {0,1,3,8}
         {0,2,8}  {0,1,5,8}
         {0,3,8}  {0,1,6,8}
         {0,5,8}  {0,2,3,8}
         {0,6,8}  {0,2,7,8}
         {0,7,8}  {0,3,7,8}
                  {0,5,6,8}
                  {0,5,7,8}
and the following compositions:
  (8)  (17)  (125)
       (26)  (143)
       (35)  (152)
       (53)  (215)
       (62)  (251)
       (71)  (341)
             (512)
             (521)
		

Crossrefs

Row sums are A169942.
Row lengths are A325678(n) = A143824(n + 1) - 1.
Column k = 2 is A052928.
Column k = 3 is A325686.
Rightmost column is A325683.

Programs

  • Mathematica
    DeleteCases[Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{k}],UnsameQ@@ReplaceList[#,{_,s__,_}:>Plus[s]]&]],{n,15},{k,n}],0,{2}]
Showing 1-10 of 74 results. Next