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-4 of 4 results.

A103294 Triangle T, read by rows: T(n,k) = number of complete rulers with length n and k segments (n >= 0, k >= 0).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 3, 1, 0, 0, 0, 4, 4, 1, 0, 0, 0, 2, 9, 5, 1, 0, 0, 0, 0, 12, 14, 6, 1, 0, 0, 0, 0, 8, 27, 20, 7, 1, 0, 0, 0, 0, 4, 40, 48, 27, 8, 1, 0, 0, 0, 0, 0, 38, 90, 75, 35, 9, 1, 0, 0, 0, 0, 0, 30, 134, 166, 110, 44, 10, 1, 0, 0, 0, 0, 0, 14, 166, 311, 277, 154, 54, 11, 1
Offset: 0

Views

Author

Peter Luschny, Feb 28 2005

Keywords

Comments

If n=k then T(n,k)=1.
A sparse ruler, or simply a ruler, is a strict increasing finite sequence of nonnegative integers starting from 0 called marks.
A segment of a ruler is the space between two adjacent marks. The number of segments is the number of marks - 1.
A ruler is complete if the set of all distances it can measure is {1,2,3,...,k} for some integer k>=1.
A ruler is perfect if it is complete and no complete ruler with the same length possesses less marks.
A ruler is optimal if it is perfect and no perfect ruler with the same number of segments has a greater length.
The 'empty ruler' with length n=0 is considered perfect and optimal.

Examples

			Rows begin:
[1],
[0,1],
[0,0,1],
[0,0,2,1],
[0,0,0,3,1],
[0,0,0,4,4,1],
[0,0,0,2,9,5,1],
[0,0,0,0,12,14,6,1],
[0,0,0,0,8,27,20,7,1],
...
a(19)=T(5,4)=4 counts the complete rulers with length 5 and 4 segments: {[0,2,3,4,5],[0,1,3,4,5],[0,1,2,4,5],[0,1,2,3,5]}
		

References

  • G. S. Bloom and S. W. Golomb, Numbered complete graphs, unusual rulers, and assorted applications. Theory and Applications of Graphs, Lecture Notes in Math. 642, (1978), 53-65.
  • R. K. Guy, Modular difference sets and error correcting codes. in: Unsolved Problems in Number Theory, 3rd ed. New York: Springer-Verlag, chapter C10, pp. 181-183, 2004.
  • J. C. P. Miller, Difference bases: Three problems in additive number theory, pp. 299-322 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.

Crossrefs

Row sums give A103295.
Column sums give A103296.
The first nonzero entries in the rows give A103300.
The last nonzero entries in the columns give A103299.
The row numbers of the last nonzero entries in the columns give A004137.

Programs

  • Mathematica
    marks[n_, k_] := Module[{i}, i[0] = 0; iter = Sequence @@ Table[{i[j], i[j - 1] + 1, n - k + j - 1}, {j, 1, k}]; Table[Join[{0}, Array[i, k], {n}],
         iter // Evaluate] // Flatten[#, k - 1]&];
    completeQ[ruler_List] := Range[ruler[[-1]]] == Sort[ Union[ Flatten[ Table[ ruler[[i]] - ruler[[j]], {i, 1, Length[ruler]}, {j, 1, i - 1}]]]];
    rulers[n_, k_] := Select[marks[n, k - 1], completeQ];
    T[n_, n_] = 1; T[, 0] = 0; T[n, k_] := Length[rulers[n, k]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Quiet (* Jean-François Alcover, Jul 05 2019 *)
  • Sage
    def isComplete(R) :
        S = Set([])
        L = len(R)-1
        for i in range(L,0,-1) :
            for j in (1..i) :
                S = S.union(Set([R[i]-R[i-j]]))
        return len(S) == R[L]
    def Partsum(T) :
        return [add([T[j] for j in range(i)]) for i in (0..len(T))]
    def Ruler(L, S) :
        return map(Partsum, Compositions(L, length=S))
    def CompleteRuler(L, S) :
        return tuple(filter(isComplete, Ruler(L, S)))
    for n in (0..8):
        print([len(CompleteRuler(n,k)) for k in (0..n)]) # Peter Luschny, Jul 05 2019

Extensions

Typo in data corrected by Jean-François Alcover, Jul 05 2019

A004137 Maximal number of edges in a graceful graph on n nodes.

Original entry on oeis.org

0, 1, 3, 6, 9, 13, 17, 23, 29, 36, 43, 50, 58, 68, 79, 90, 101, 112, 123, 138, 153, 168, 183, 198, 213, 232
Offset: 1

Views

Author

Keywords

Comments

A graph with e edges is "graceful" if its nodes can be labeled with distinct integers in {0,1,...,e} so that, if each edge is labeled with the absolute difference between the labels of its endpoints, then the e edges have the distinct labels 1, 2, ..., e.
Equivalently, maximum m for which there's a restricted difference basis with respect to m with n elements. A "difference basis w.r.t. m" is a set of integers such that every integer from 1 to m is a difference between two elements of the set. A "restricted" difference basis is one in which the smallest element is 0 and the largest is m.
a(n) is also the length of an optimal ruler with n marks. For definitions see A103294. For example, a(6)=13 is the length of the optimal rulers with 6 marks, {[0, 1, 6, 9, 11, 13], [0, 2, 4, 7, 12, 13], [0, 1, 4, 5, 11, 13], [0, 2, 8, 9, 12, 13], [0, 1, 2, 6, 10, 13], [0, 3, 7, 11, 12, 13]}. Also n = 1 + A103298(a(n)). - Peter Luschny, Feb 28 2005
If the conjecture is true that an optimal ruler with more than 12 segments is a Wichmann ruler then the sequence continues 232, 251, 270, 289, 308, 327, ... - Peter Luschny, Oct 09 2011 [updated to take the verifications of Robison into account, Oct 01 2015]

Examples

			a(7)=17: Label the 7 nodes 0,1,8,11,13,15,17 and include all edges except those from 8 to 15, from 13 to 15, from 13 to 17 and from 15 to 17. {0,1,8,11,13,15,17} is a restricted difference basis w.r.t. 17.
a(21)=153 because there exists a complete ruler (i.e., one that can measure every distance between 1 and 153) with marks [0,1,2,3,7,14,21,28,43,58,73,88,103,118,126,134,142,150,151,152,153] and no complete ruler of greater length with the same number of marks can be found. This ruler is of the type described by B. Wichmann and it is conjectured by _Peter Luschny_ that it is impossible to improve upon Wichmann's construction for finding optimal rulers of bigger lengths.
		

References

  • J.-C. Bermond, Graceful graphs, radio antennae and French windmills, pp. 18-37 of R. J. Wilson, editor, Graph Theory and Combinatorics. Pitman, London, 1978.
  • R. K. Guy, Modular difference sets and error correcting codes. in: Unsolved Problems in Number Theory, 3rd ed. New York: Springer-Verlag, chapter C10, (2004), 181-183.
  • J. C. P. Miller, Difference bases: Three problems in additive number theory, pp. 299-322 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A080060 is an erroneous version of the sequence, given in Bermond's paper. Cf. A005488.
A289761 provides the conjectured continuation.

Programs

  • C
    See Klaus Nagel link.
    (Parallel C++) See A. Robison link.

Formula

a(n) = n*(n-1)/2 - A212661(n). - Kellen Myers, Jun 06 2016

Extensions

Miller's paper gives these lower bounds for the 8 terms from a(15) to a(22): 79, 90, 101, 112, 123, 138, 153, 168.
Edited by Dean Hickerson, Jan 26 2003
Terms 79,...,123 from Peter Luschny, Feb 28 2005, with verification by an independent program written by Klaus Nagel. Using this program Hugo Pfoertner found the next term, 138.
Using this program Hugo Pfoertner found further evidence for the conjectured term a(21)=153, Feb 23 2005
Terms a(21) .. a(24) proved by exhaustive search by Arch D. Robison, Hugo Pfoertner, Nov 01 2013
Term a(25) proved by exhaustive search by Arch D. Robison, Peter Luschny, Jan 14 2014
Term a(26) proved by exhaustive search by Fabian Schwartau, Yannic Schröder, Lars Wolf, Joerg Schoebel, Feb 22 2021

A103296 Number of complete rulers with n segments.

Original entry on oeis.org

1, 1, 3, 10, 38, 175, 885, 5101, 32080, 219569, 1616882, 12747354, 106948772, 950494868
Offset: 0

Views

Author

Peter Luschny, Feb 28 2005

Keywords

Comments

For definitions, references and links related to complete rulers see A103294.
a(10) > 1616740 (contributions from rows of A103294 up to 39). - Hugo Pfoertner, Dec 16 2021

Examples

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

Crossrefs

Cf. A103301 (perfect rulers with n segments), A103299 (optimal rulers with n segments).
Cf. A103294, A103295 (complete rulers of length n).

Programs

  • Fortran
    ! Link to FORTRAN program given in A103295.

Formula

a(n) = Sum_{i=n..A004137(n+1)} T(i, n) where T is the A103294 triangle.

Extensions

a(9) from Hugo Pfoertner, Mar 17 2005
a(10)-a(11) from Fausto A. C. Cariboni, Mar 03 2022
a(12)-a(13) from Fausto A. C. Cariboni, Mar 08 2022

A103301 Number of perfect rulers with n segments (n>=0).

Original entry on oeis.org

1, 1, 3, 9, 24, 88, 254, 1064, 1644, 3382, 4156, 8022, 26264, 52012, 25434, 8506, 5632, 6224, 12330, 34224, 108854, 103156, 75992, 86560, 69084
Offset: 0

Views

Author

Peter Luschny, Feb 28 2005

Keywords

Comments

For definitions, references and links related to complete rulers see A103294.

Examples

			a(3)=9 counts the perfect rulers with 3 segments, {[0,1,2,4],[0,2,3,4], [0,1,3,4],[0,1,3,5],[0,2,4,5],[0,1,2,5],[0,3,4,5],[0,1,4,6],[0,2,5,6]}.
		

Crossrefs

Cf. A103300, A103297, A103296 (Complete rulers with n segments), A103299 (Optimal rulers with n segments).

Formula

a(n) = Sum_{i=A004137(n)+1..A004137(n+1)} A103300(i), n>=1.

Extensions

Terms a(19)-a(24) found by exhaustive search by Fabian Schwartau, Yannic Schröder, Lars Wolf, Joerg Schoebel, Feb 23 2021
Showing 1-4 of 4 results.