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.

Previous Showing 11-20 of 21 results. Next

A103297 Number of different lengths that perfect rulers with n segments can have.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 4, 6, 6, 7, 7, 7, 8, 10, 11, 11, 11, 11, 11, 13, 14, 15, 15, 16, 14, 19
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)=4 because a perfect ruler with 5 segments may have the length 10, 11, 12 or 13.
		

Crossrefs

Cf. A103298.

Formula

a(n) = A004137(n+1) - A004137(n) for n>= 1.

Extensions

Term a(19) corrected and terms a(20)-a(25) added by Fabian Schwartau, Yannic Schröder, Lars Wolf, Joerg Schoebel, Feb 23 2021

A104307 Least maximum of differences between consecutive marks that can occur amongst all possible perfect rulers of length n.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3, 4, 4, 3, 4, 4, 4, 5, 6, 4, 4, 5, 5, 6, 6, 5, 5, 5, 6, 6, 6, 7, 5, 6, 6, 6, 6, 7, 7, 6, 6, 6, 6, 7, 7, 7, 6, 6, 6, 7, 7, 7, 7, 9, 6, 7, 7, 7, 7, 7, 8, 11, 9, 10, 7, 7, 7, 8, 8, 9, 10, 9, 10, 10, 11, 8, 8, 9, 9, 10, 9, 11, 10, 10, 11, 11, 9, 9, 10, 9, 10, 11, 10
Offset: 1

Views

Author

Hugo Pfoertner, Mar 01 2005

Keywords

Comments

For nomenclature related to perfect and optimal rulers see Peter Luschny's "Perfect Rulers" web pages.

Examples

			There are A103300(13)=6 perfect rulers of length 13: [0,1,2,6,10,13], [0,1,4,5,11,13], [0,1,6,9,11,13] and their mirror images. The first ruler produces the least maximum difference 4=6-2=10-6 between any of its adjacent marks. Therefore a(13)=4.
		

Crossrefs

Cf. A104308 corresponding occurrence counts, A104310 position of latest occurrence of n as a sequence term, A103294 definitions related to complete rulers.

A193802 Length of optimal Wichmann rulers.

Original entry on oeis.org

3, 6, 9, 29, 36, 43, 50, 68, 79, 90, 101, 112, 123, 138, 153, 168, 183, 198, 213
Offset: 1

Views

Author

Peter Luschny, Oct 22 2011

Keywords

Comments

R is an optimal Wichmann ruler iff R is an optimal ruler (for definition see A103294) and there exist two integers r>=0 and s>=0 such that the type of the difference representation of the ruler is [1*r, r+1, (2r+1)*r, (4r+3)*s, (2r+2)*(r+1), 1*r].
a(n) is a subsequence of A193803.

Examples

			[0, 1, 2, 5, 10, 15, 26, 37, 48, 54, 60, 66, 67, 68] is an optimal Wichmann ruler with length 68 of Wichmann type (2,3). By contrast [0, 1, 2, 8, 15, 16, 26, 36, 46, 56, 59, 63, 65, 68] is an optimal ruler with length 68 which is not a Wichmann ruler.
		

Crossrefs

Extensions

a(16)-a(19) from Hugo Pfoertner, Jul 12 2017

A193803 Length of perfect Wichmann rulers.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 22, 29, 36, 43, 46, 50, 57, 64, 68, 71, 79, 90, 101, 108, 112, 123, 134, 138, 145, 153, 156, 168, 175, 183
Offset: 1

Views

Author

Peter Luschny, Oct 22 2011

Keywords

Comments

R is a perfect Wichmann ruler iff R is a perfect ruler (for definition see A103294) and there exist two integers r>=0 and s>=0 such that the type of the difference representation of the ruler is [1*r, r+1, (2r+1)*r, (4r+3)*s, (2r+2)*(r+1), 1*r].

Examples

			[0, 1, 2, 5, 10, 15, 26, 37, 48, 54, 60, 66, 67, 68] is a perfect Wichmann ruler with length 68 of Wichmann type (2,3). By contrast [0, 1, 2, 8, 15, 16, 26, 36, 46, 56, 59, 63, 65, 68] is a perfect ruler with length 68 which is not a Wichmann ruler.
		

Crossrefs

A331330 a(n) is the number of sparse rulers of length n where the length of the first segment is unique.

Original entry on oeis.org

0, 1, 1, 3, 4, 8, 14, 26, 46, 85, 155, 286, 528, 980, 1824, 3410, 6392, 12022, 22675, 42885, 81312, 154540, 294362, 561849, 1074463, 2058462, 3950220, 7592403, 14614105, 28168227, 54363000, 105043517, 203200635, 393496975, 762765642, 1479957400, 2874038529, 5585986973, 10865544853, 21150913457, 41201771886
Offset: 0

Views

Author

Peter Luschny, Jan 24 2020

Keywords

Comments

A sparse ruler, or simply a ruler, is a strict increasing finite sequence of nonnegative integers starting from 0 called marks. See A103294 for more definitions.
Also number of compositions of n where the first part is unique. - Christian Sievers, May 06 2025

Examples

			All rulers of length four are listed below; those marked with x are counted: [0,4]x, [0,3,4]x, [0,2,4], [0,1,4]x, [0,2,3,4]x, [0,1,3,4], [0,1,2,4], [0,1,2,3,4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(
         `if`(i=j, 0, b(n-j, `if`(nAlois P. Heinz, Feb 06 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[If[i==j, 0, b[n-j, If[nJean-François Alcover, Nov 15 2020, after Alois P. Heinz *)
  • PARI
    \\ omits the initial 0
    lista(n)=Vec(sum(k=1,n,(x^k+x*O(x^n))/(1-x/(1-x)+x^k))) \\ Christian Sievers, May 06 2025
  • Python
    cache={}
    def f( n, l1):
      args=(n, l1)
      if args in cache: return cache[args]
      s=0
      for l in range(1, n+1):
        if l!=l1:
          s += 1 if l==n else f(n-l, l1)
      cache[args] = s
      return s
    def a331330(n):
      if n==0: return 0
      s=1
      for l1 in range(1, n+1):
        s += f( n-l1, l1)
      return s
    # Bert Dobbelaere, Feb 06 2020
    

Formula

a(n) = A331332(n,1) for n >= 1.
Conjecture: a(n) ~ 2^n / (n * log(2)). - Vaclav Kotesovec, Nov 16 2020
G.f.: Sum_{k>=1} x^k/(1-x/(1-x)+x^k). - Christian Sievers, May 06 2025

Extensions

More terms from Bert Dobbelaere, Feb 06 2020

A331332 Sparse ruler statistics: T(n,k) (0 <= k <= n) is the number of rulers with length n where the length of the first segment appears k times. Triangle read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 3, 0, 1, 0, 8, 4, 3, 0, 1, 0, 14, 9, 4, 4, 0, 1, 0, 26, 16, 12, 4, 5, 0, 1, 0, 46, 34, 21, 15, 5, 6, 0, 1, 0, 85, 64, 45, 28, 20, 6, 7, 0, 1, 0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1, 0, 286, 236, 183, 128, 90, 48, 35, 8, 9, 0, 1, 0, 528, 452, 361, 269, 185, 126, 63, 44, 9, 10, 0, 1
Offset: 0

Views

Author

Peter Luschny, Jan 24 2020

Keywords

Comments

A sparse ruler, or simply a ruler, is a strict increasing finite sequence of nonnegative integers starting from 0 called marks. See A103294 for more definitions.

Examples

			Triangle starts:
[ 0][1]
[ 1][0,   1]
[ 2][0,   1,   1]
[ 3][0,   3,   0,  1]
[ 4][0,   4,   3,  0,  1]
[ 5][0,   8,   4,  3,  0,  1]
[ 6][0,  14,   9,  4,  4,  0,  1]
[ 7][0,  26,  16, 12,  4,  5,  0, 1]
[ 8][0,  46,  34, 21, 15,  5,  6, 0, 1]
[ 9][0,  85,  64, 45, 28, 20,  6, 7, 0, 1]
[10][0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1]
		

Crossrefs

Columns k=0-1 give: A000007, A331330.
Row sums give A011782.
Row sums over even columns give A331609 (for n>0).
Row sums over odd columns give A331606 (for n>0).
T(2n,n) gives A332051.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, x, add(expand(
         `if`(i=j, x, 1)*b(n-j, `if`(n (p-> seq(coeff(p, x, i), i=0..degree(p)))(
                `if`(n=0, 1, add(b(n-j, j), j=1..n))):
    seq(T(n), n=0..12);  # Alois P. Heinz, Feb 06 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, x, Sum[Expand[If[i == j, x, 1] b[n - j, If[n < i + j, 0, i]]], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, Sum[b[n - j, j], {j, 1, n}]]];
    T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Nov 08 2020, after Alois P. Heinz *)
  • SageMath
    def A331332_row(n):
        if n == 0: return [1]
        L = [0 for k in (0..n)]
        for c in Compositions(n):
            L[list(c).count(c[0])] += 1
        return L
    for n in (0..10): print(A331332_row(n))

Formula

Sum_{k=1..n} k * T(n,k) = A175656(n-1) for n>0. - Alois P. Heinz, Feb 07 2020

A104308 Number of perfect rulers of length n having the least possible largest difference between any adjacent marks that can occur amongst all perfect rulers of this length.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 1, 7, 3, 1, 1, 3, 1, 3, 1, 1, 12, 3, 1, 1, 1, 4, 1, 6, 1, 1, 1, 22, 7, 1, 3, 1, 1, 1, 1, 15, 3, 1, 1, 1, 1, 14, 3, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 2, 1, 13, 3, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 7, 3, 10, 4, 2, 3, 1, 1, 7, 3, 26, 10, 10, 2, 1, 3, 1, 1, 1, 26, 10, 26, 2, 4, 8, 3, 1, 1, 1
Offset: 1

Views

Author

Hugo Pfoertner, Mar 01 2005

Keywords

Comments

For nomenclature related to perfect and optimal rulers see Peter Luschny's "Perfect Rulers" web pages.

Examples

			a(11)=3 because 3 of the A103300(11)/2=15 perfect rulers of length 11 can be constructed using the shortest possible maximum segment length A104307(11)=3: [0,1,2,5,8,11], [0,1,4,6,9,11], [0,1,4,7,9,11], not counting their mirror images.
		

Crossrefs

Cf. A104307 size of minimally required longest segment, A103294 definitions related to complete rulers.

A104309 Minimum length of a perfect ruler that contains a segment not shorter than n.

Original entry on oeis.org

1, 3, 5, 7, 10, 12, 14, 16, 18, 20, 24, 24, 27, 30, 31, 33, 37, 37, 39, 44, 44, 45, 51, 51, 51, 54, 59, 59, 60, 62, 69, 69, 69, 70, 80, 80, 80, 81, 83, 91, 91, 91, 91, 93
Offset: 1

Views

Author

Hugo Pfoertner, Mar 01 2005

Keywords

Comments

For nomenclature related to perfect and optimal rulers see Peter Luschny's "Perfect Rulers" web pages.

Examples

			The list of shortest perfect rulers containing a segment>=n starts:
n.a(n)..rulers..(marks enclosing longest segment)
1..1....[0,1]........(0,1)
2..3....[0,1,3]......(1,3)
3..5....[0,1,2,5]....(2,5)
4..7....[0,1,2,3,7]..(3,7)
5.10....[0,1,2,4,9,10]..(4,9)
........[0,1,3,4,9,10]..(4,9)
........[0,1,6,7,8,10]..(1,6)
6.12....[0,1,3,5,11,12]..(5,11)
........[0,1,7,8,10,12]..(1,7)
7.14....[0,1,2,4,6,13,14]...(6,13)
........[0,1,3,4,6,13,14]...(6,13)
........[0,1,3,5,6,13,14]...(6,13)
........[0,1,8,9,10,12,14]..(1,8)
........[0,1,8,9,11,12,14]..(1,8)
8.16....[0,1,3,5,7,15,16]....(7,15)
........[0,1,9,10,12,14,16]..(1,9)
		

Crossrefs

Cf. A104305 largest possible segment in a perfect ruler of length n, A104310 maximum length of perfect rulers made from segments not exceeding n, A103294 definitions related to complete rulers.

A104310 Maximum length of perfect rulers that can be made from segments not exceeding n.

Original entry on oeis.org

2, 7, 18, 25, 32, 59, 71, 81, 103, 135
Offset: 1

Views

Author

Hugo Pfoertner, Mar 01 2005

Keywords

Comments

We conjecture the extension a(8)=81. For nomenclature related to perfect and optimal rulers see Peter Luschny's "Perfect Rulers" web pages.

Examples

			The complete list of these rulers starts:
n.a(n)..rulers
1..2....[0,1,2]
2..7....[0,1,3,5,7]
3.18....[0,1,4,7,10,13,16]
4.25....[0,1,2,6,10,13,17,21,25]
........[0,1,2,6,10,14,17,21,25]
........[0,1,2,6,10,14,18,21,25]
........[0,1,3,7,11,15,19,23,25]
5.37....[0,1,2,3,8,13,18,23,28,33,37]
6.59....[0,1,4,10,16,22,28,34,40,46,52,54,57,59]
		

Crossrefs

Cf. A104307 Least maximum of differences between consecutive marks, A104309 minimum length of perfect rulers containing a segment of length n, A103294 definitions related to complete rulers.

Extensions

Conjectured a(8) proven via exhaustive search and a(9) ... a(10) added by Fabian Schwartau, Yannic Schröder, Lars Wolf, Joerg Schoebel, Feb 23 2021

A227956 Possible lengths of minimal prime number rulers.

Original entry on oeis.org

3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 44, 62
Offset: 1

Views

Author

Peter Luschny, Aug 26 2013

Keywords

Comments

A ruler is a prime number ruler provided all its interior marks are on a prime number position. A ruler is called complete when any positive integer distance up to the length of the ruler can be measured. A complete ruler is called minimal when any subsequence of its marks is not complete for the same length. A complete ruler is perfect, if there is no complete ruler with the same length which possesses fewer marks. A perfect ruler is minimal (but not conversely). For definitions, references and links related to complete rulers see A103294.
The possible lengths of perfect prime number rulers are: 3, 4, 6, 8, 14, 18, 20, 24, 30, 32. There are 102 prime number rulers in total, 28 of which are minimal prime number rulers and 12 perfect prime number rulers.
a(n) is a finite subsequence of A008864.

Examples

			[0, 2, 3, 5, 7, 11, 17, 18] is a minimal and also a perfect prime number ruler.
[0, 2, 3, 5, 7, 11, 13, 19, 20] is a minimal but not a perfect prime number ruler.
		
Previous Showing 11-20 of 21 results. Next