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.
%I A003022 M2540 #107 Feb 16 2025 08:32:27 %S A003022 1,3,6,11,17,25,34,44,55,72,85,106,127,151,177,199,216,246,283,333, %T A003022 356,372,425,480,492,553,585 %N A003022 Length of shortest (or optimal) Golomb ruler with n marks. %C A003022 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. %C A003022 From _David W. Wilson_, Aug 17 2007: (Start) %C A003022 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. %C A003022 An optimal n-mark Golomb ruler has the smallest possible length (distance between the two end marks) for an n-mark ruler. %C A003022 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) %C A003022 Positions where A143824 increases (see also A227590). - _N. J. A. Sloane_, Apr 08 2016 %C A003022 From _Gus Wiseman_, May 17 2019: (Start) %C A003022 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: %C A003022 0: () %C A003022 1: (1) %C A003022 3: (2,1) %C A003022 6: (2,3,1) %C A003022 11: (3,1,5,2) %C A003022 17: (4,2,3,7,1) %C A003022 Representatives of corresponding Golomb rulers are: %C A003022 {0} %C A003022 {0,1} %C A003022 {0,2,3} %C A003022 {0,2,5,6} %C A003022 {0,3,4,9,11} %C A003022 {0,4,6,9,16,17} %C A003022 (End) %D A003022 CRC Handbook of Combinatorial Designs, 1996, p. 315. %D A003022 A. K. Dewdney, Computer Recreations, Scientific Amer. 253 (No. 6, Jun), 1985, pp. 16ff; 254 (No. 3, March), 1986, pp. 20ff. %D A003022 S. W. Golomb, How to number a graph, pp. 23-37 of R. C. Read, editor, Graph Theory and Computing. Academic Press, NY, 1972. %D A003022 Richard K. Guy, Unsolved Problems in Number Theory (2nd edition), Springer-Verlag (1994), Section C10. %D A003022 A. Kotzig and P. J. Laufer, Sum triangles of natural numbers having minimum top, Ars. Combin. 21 (1986), 5-13. %D A003022 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) %D A003022 Rhys Price Jones, Gracelessness, Proc. 10th S.-E. Conf. Combin., Graph Theory and Computing, 1979, pp. 547-552. %D A003022 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. %D A003022 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A003022 Anonymous, <a href="http://members.aol.com/golomb20">In Search Of The Optimal 20, 21 and 22 Mark Golomb Rulers</a> %H A003022 A. K. Dewdney, <a href="/A003022/a003022.pdf">Computer Recreations</a>, Scientific Amer. 253 (No. 6, Jun), 1985, pp. 16ff; 254 (No. 3, March), 1986, pp. 20ff. [Annotated scanned copy] %H A003022 Distributed.Net, <a href="http://www.distributed.net/ogr">Project OGR</a> %H A003022 Kent Freeman, <a href="/A003022/a003022_2.pdf">Unpublished notes.</a> [Scanned copy] %H A003022 Michael Geißer, Theresa Körner, Sascha Kurz, and Anne Zahn, <a href="https://arxiv.org/abs/2112.00444">Squares with three digits</a>, arXiv:2112.00444 [math.NT], 2021. %H A003022 S. W. Golomb, <a href="/A003022/a003022_3.pdf">Letter to N. J. A. Sloane, 1972</a>. %H A003022 A. Kotzig and P. J. Laufer, <a href="/A003022/a003022_1.pdf">Sum triangles of natural numbers having minimum top</a>, Ars. Combin. 21 (1986), 5-13. [Annotated scanned copy] %H A003022 Joseph Malkevitch, <a href="http://www.ams.org/samplings/feature-column/fc-2012-01">Weird Rulers</a>. %H A003022 G. Martin and K. O'Bryant, <a href="https://arxiv.org/abs/math/0408081">Constructions of generalized Sidon sets</a>, arXiv:math/0408081 [math.NT], 2004-2005. %H A003022 L. Miller, <a href="http://www.cuug.ab.ca/~millerl/g3-records.html">Golomb Rulers</a> %H A003022 K. O'Bryant, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/OBryant/obr3.html">Sets of Natural Numbers with Proscribed Subsets</a>, J. Int. Seq. 18 (2015) # 15.7.7 %H A003022 Ed Pegg, Jr., <a href="http://www.mathpuzzle.com/MAA/30-Rulers and Arrays/mathgames_11_15_04.html">Math Games: Rulers, Arrays, and Gracefulness</a> %H A003022 B. Rankin, <a href="http://www.ee.duke.edu/~wrankin/golomb/golomb.html">Golomb Ruler Calculations</a> %H A003022 W. Schneider, <a href="http://web.archive.org/web/2004/www.wschnei.de/number-theory/golomb-rulers.html">Golomb Rulers</a> %H A003022 J. B. Shearer, <a href="http://www.research.ibm.com/people/s/shearer/grtab.html">Golomb ruler table</a> %H A003022 J. B. Shearer, <a href="http://www.research.ibm.com/people/s/shearer/gropt.html">Table of Known Optimal Golomb Rulers</a> %H A003022 J. B. Shearer, <a href="http://www.research.ibm.com/people/s/shearer/dtsopt.html">Difference Triangle Sets: Known optimal solutions</a>. %H A003022 J. B. Shearer, <a href="http://www.research.ibm.com/people/s/shearer/dtslb.html">Difference Triangle Sets: Discoverers</a> %H A003022 David Singmaster, David Fielker, N. J. A. Sloane, <a href="/A004116/a004116.pdf">Correspondence, August 1979</a> %H A003022 N. J. A. Sloane, <a href="/A003022/a003022.gif">First few optimal Golomb rulers</a> %H A003022 D. Vanderschel et al., <a href="http://members.aol.com/golomb20/">In Search Of The Optimal 20, 21 and 22 Mark Golomb Rulers</a> %H A003022 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GolombRuler.html">Golomb Ruler.</a> %H A003022 Wikipedia, <a href="http://en.wikipedia.org/wiki/Golomb_ruler">Golomb ruler</a> %H A003022 <a href="/index/Go#Golomb">Index entries for sequences related to Golomb rulers</a> %F A003022 a(n) >= n(n-1)/2, with strict inequality for n >= 5 (Golomb). - _David W. Wilson_, Aug 18 2007 %e A003022 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. %t A003022 Min@@Total/@#&/@GatherBy[Select[Join@@Permutations/@Join@@Table[IntegerPartitions[i],{i,0,15}],UnsameQ@@ReplaceList[#,{___,s__,___}:>Plus[s]]&],Length] (* _Gus Wiseman_, May 17 2019 *) %o A003022 (Python) %o A003022 from itertools import combinations, combinations_with_replacement, count %o A003022 def a(n): %o A003022 for k in count(n-1): %o A003022 for c in combinations(range(k), n-1): %o A003022 c = c + (k, ) %o A003022 ss = set() %o A003022 for s in combinations_with_replacement(c, 2): %o A003022 if sum(s) in ss: break %o A003022 else: ss.add(sum(s)) %o A003022 if len(ss) == n*(n+1)//2: return k # _Jianing Song_, Feb 14 2025, adapted from the python program of A345731 %Y A003022 See A106683 for triangle of marks. %Y A003022 Cf. A008404, A036501, A039953, A078106, A030873. %Y A003022 0-1-4-9-11 corresponds to 1-3-5-2 in A039953: 0+1+3+5+2=11 %Y A003022 A row or column of array in A234943. %Y A003022 Adding 1 to these terms gives A227590. Cf. A143824. %Y A003022 For first differences see A270813. %Y A003022 Cf. A103295, A108917, A143823, A169942. %Y A003022 Cf. A325466, A325545, A325676, A325677, A325678, A325683. %K A003022 nonn,hard,nice,more %O A003022 2,2 %A A003022 _N. J. A. Sloane_ %E A003022 425 sent by _Ed Pegg Jr_, Nov 15 2004 %E A003022 a(25), a(26) proved by OGR-25 and OGR-26 projects, added by _Max Alekseyev_, Sep 29 2010 %E A003022 a(27) proved by OGR-27, added by _David Consiglio, Jr._, Jun 09 2014 %E A003022 a(28) proved by OGR-28, added by _David Consiglio, Jr._, Jan 19 2023