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.

A103300 Number of perfect rulers with length n.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 2, 12, 8, 4, 38, 30, 14, 6, 130, 80, 32, 12, 500, 326, 150, 66, 18, 4, 944, 460, 166, 56, 12, 6, 2036, 890, 304, 120, 20, 10, 2, 2678, 974, 362, 100, 36, 4, 2, 4892, 2114, 684, 238, 68, 22, 4, 16318, 6350, 2286, 836, 330, 108, 24, 12, 31980, 12252
Offset: 0

Views

Author

Peter Luschny, Feb 28 2005

Keywords

Comments

For definitions, references and links related to complete rulers see A103294.
The values for n = 208-213 are 22,0,0,0,4,4 according to Arch D. Robison. The values for 199-207 are not yet known. - Peter Luschny, Feb 20 2014, Jun 28 2019
Zero values at 135, 136, 149, 150, 151, 164, 165, 166, 179, 180, 181, 195, 196, 209, 210, 211. - Ed Pegg Jr, Jun 23 2019 [These values were found by Arch D. Robison, see links. Peter Luschny, Jun 28 2019]
From Yannic Schröder, Feb 22 2021: (Start)
Zero values at 135, 136, 149, 150, 151, 164, 165, 166, 179, 180, 181, 195, 196 have been replaced with correct values using an additional mark.
A lower bound for 209 is 62, for 210 is 16, and for 211 is 204.
The verified value for 212 and for 213 is 4. (End)

Examples

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

Crossrefs

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

Formula

a(n) = T(n, A103298(n)) where the triangle T is described by A103294.

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

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

A103299 Number of optimal rulers with n segments (n>=0).

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 12, 4, 6, 2, 2, 4, 12, 4, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4
Offset: 0

Views

Author

Peter Luschny, Feb 28 2005

Keywords

Comments

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

Examples

			a(5)=6 counts the optimal rulers with 5 segments, {[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]}.
		

Crossrefs

Cf. A103296 (Complete rulers with n segments), A103301 (Perfect rulers with n segments).

Formula

a(n) = A103300(A004137(n+1)).

Extensions

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