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

A245920 Limit-reverse of the (2,1)-version of the infinite Fibonacci word A014675 with first term as initial block.

Original entry on oeis.org

2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Suppose S = (s(0), s(1), s(2),...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m-k), s(m-k+1),...,s(m)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i-k), s(i-k+1),...,s(i)) = B(m,k), and put B(m(1),k+1) = (s(m(1)-k-1), s(m(1)-k),...,s(m(1))). Let m(2) be the least i > m(1) such that (s(i-k-1), s(i-k),...,s(i)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)-k-2), s(m(2)-k-1),...,s(m(2))). Continuing in this manner gives a sequence of blocks B(m(n),k+n). Let B'(n) = reverse(B(m(n),k+n)), so that for n >= 1, B'(n) comes from B'(n-1) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limit-reverse of S with initial block B(m,k)", denoted by S*(m,k), or simply S*.
The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-reversing S with initial block B(m,k)" or simply the index sequence for S*, as in A245921.
For numbers represented by taking S and S* as continued fractions, see A245975 and A245976. If S is taken to be the classical (0,1)-version of the infinite Fibonacci word, then S* is obtained from the present sequence by substituting 0 for 2 throughout, as in A241422.
The limit-reverse, S*, is analogous to a limiting block extension, S^, defined at A246127. The essential difference is that S^ is formed by extending each new block one term to the right, whereas S* is formed by extending each new block one term to the left (and then reversing).

Examples

			S = infinite Fibonacci word A014675, B = (s(0)); that is, (m,k) = (0,0);
S = (2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...)
B'(0) = (2)
B'(1) = (2,1)
B'(2) = (2,1,2)
B'(3) = (2,1,2,1)
B'(4) = (2,1,2,1,2)
B'(5) = (2,1,2,1,2,2)
S* = (2,1,2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...),
with index sequence (0,2,5,7,15,...)
		

Crossrefs

Programs

  • Mathematica
    z = 100; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind]; x = GoldenRatio; s =  Differences[Table[Floor[n*x], {n, 1, z^2}]] ; ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[1]]}]; cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}]; rcf = Last[Map[Reverse, cfs]]

A246128 Index sequence for limit-block extending the (2,1)-version of the infinite Fibonacci word A014675 with first term as initial block.

Original entry on oeis.org

0, 2, 7, 10, 15, 23, 31, 36, 44, 49, 57, 70, 78, 91, 104, 112, 125, 138, 159, 193, 214, 248, 282, 303, 337, 371, 392, 426, 447, 481, 515, 536, 570, 591, 625, 659, 680, 714, 748, 803, 892, 981, 1036, 1125, 1180, 1269, 1358, 1413, 1502, 1557, 1646, 1735, 1790
Offset: 0

Views

Author

Keywords

Comments

Suppose S = (s(0), s(1), s(2), ...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m), s(m+1),...s(m+k)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i), s(i+1),...,s(i+k)) = B(m,k), and put B(m(1),k+1) = (s(m(1)), s(m(1)+1),...s(m(1)+k+1)). Let m(2) be the least i > m(1) such that (s(i), s(i+1),...,s(i+k)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)), s(m(2)+1),...s(m(2)+k+2)). Continuing in this manner gives a sequence of blocks B'(n) = B(m(n),k+n), so that for n >= 0, B'(n+1) comes from B'(n) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limiting block extension of S with initial block B(m,k)", denoted by S^.
...
The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-block extending S with initial block B(m,k)", as in A246127.

Examples

			S = the infinite Fibonacci word A014675, with B = (s(0)); that is, (m,k) = (0,0); S = (2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...)
B'(0) = (2)
B'(1) = (2,2)
B'(2) = (2,2,1)
B'(3) = (2,2,1,2)
B'(4) = (2,2,1,2,1)
B'(5) = (2,2,1,2,1,2)
S^ = (2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2,...),
with index sequence (0,2,7,10,15,...)
		

Crossrefs

Programs

  • Mathematica
    seqPosition1[list_, seqtofind_] := If[Length[#] > Length[list], {}, Last[Last[      Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 1]]]] &[seqtofind]; s = Differences[Table[Floor[n*GoldenRatio], {n, 10000}]]; t = {{2}}; p[0] = seqPosition1[s, Last[t]]; s = Drop[s, p[0]]; Off[Last::nolast]; n = 1; While[(p[n] = seqPosition1[s, Last[t]]) > 0, (AppendTo[t, Take[s, {#, # + Length[Last[t]]}]]; s = Drop[s, #]) &[p[n]]; n++]; On[Last::nolast]; t1 = Last[t] (*A246127*)
    q = -1 + Accumulate[Table[p[k], {k, 0, n - 1}]] (*A246128*)

A245921 Index sequence for limit-reversing the (2,1)-version of the infinite Fibonacci word A014675 with first term as initial block.

Original entry on oeis.org

0, 2, 5, 7, 15, 20, 28, 36, 41, 54, 75, 96, 109, 130, 143, 164, 185, 198, 219, 240, 253, 274, 308, 329, 363, 397, 418, 452, 473, 507, 541, 562, 596, 617, 651, 685, 706, 740, 774, 795, 829, 850, 884, 918, 973, 1007, 1062, 1117, 1151, 1206, 1261, 1295, 1350
Offset: 0

Views

Author

Keywords

Comments

Suppose S = (s(0), s(1), s(2), ...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m-k), s(m-k+1),...,s(m)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i-k), s(i-k+1),...,s(i)) = B(m,k), and put B(m(1),k+1) = (s(m(1)-k-1), s(m(1)-k),...,s(m(1))). Let m(2) be the least i > m(1) such that (s(i-k-1), s(i-k),...,s(i)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)-k-2), s(m(2)-k-1),...,s(m(2))). Continuing in this manner gives a sequence of blocks B(m(n),k+n). Let B'(n) = reverse(B(m(n),k+n)), so that for n >= 1, B'(n) comes from B'(n-1) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limit-reverse of S with initial block B(m,k)", denoted by S*(m,k), or simply S*. The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-reversing S with initial block B(m,k)" or simply the index sequence for S*, as in A245921.

Examples

			S = infinite Fibonacci word A014675, B = (s(0)); that is, (m,k) = (0,0);
S = (2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...)
B'(0) = (2)
B'(1) = (2,1)
B'(2) = (2,1,2)
B'(3) = (2,1,2,1)
B'(4) = (2,1,2,1,2)
B'(5) = (2,1,2,1,2,2)
S* = (2,1,2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...),
with index sequence (0,2,5,7,15,...)
		

Crossrefs

Programs

  • Mathematica
    z = 100; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind] (*finds the position of the SECOND appearance of seqtofind. Example: seqPosition2[{1,2,3,4,2,3},{2}] = 5*)
    A014675 = Nest[Flatten[# /. {1 -> 2, 2 -> {2, 1}}] &, {1}, 25]; ans = Join[{A014675[[p[0] = pos = seqPosition2[A014675, #] - 1]]}, #] &[{A014675[[1]]}]; cfs = Table[A014675 = Drop[A014675, pos - 1]; ans = Join[{A014675[[p[n] = pos = seqPosition2[A014675, #] - 1]]}, #] &[ans], {n, z}]; q = -1+Accumulate[Join[{1}, Table[p[n], {n, 0, z}]]] (* A245921 *)
    q1 = Differences[q] (* A245922 *)

A246127 Limiting block extension of the (2,1)-version of the infinite Fibonacci word A014675 with first term as initial block.

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2
Offset: 0

Views

Author

Keywords

Comments

Suppose S = (s(0), s(1), s(2), ...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m), s(m+1),...s(m+k)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i), s(i+1),...,s(i+k)) = B(m,k), and put B(m(1),k+1) = (s(m(1)), s(m(1)+1),...s(m(1)+k+1)). Let m(2) be the least i > m(1) such that (s(i), s(i+1),...,s(i+k)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)), s(m(2)+1),...s(m(2)+k+2)). Continuing in this manner gives a sequence of blocks B'(n) = B(m(n),k+n), so that for n >= 0, B'(n+1) comes from B'(n) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limiting block extension of S with initial block B(m,k)", denoted by S^.
...
The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-block extending S with initial block B(m,k)", as in A246128.
...
Limiting block extensions are analogous to limit-reverse sequences, S*, defined at A245920. The essential difference is that S^ is formed by extending each new block one term to the right, whereas S* is formed by extending each new block one term to the left (and then reversing).

Examples

			S = the infinite Fibonacci word A014675, with B = (s(0)); that is, (m,k) = (0,0)
S = (2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...)
B'(0) = (2)
B'(1) = (2,2)
B'(2) = (2,2,1)
B'(3) = (2,2,1,2)
B'(4) = (2,2,1,2,1)
B'(5) = (2,2,1,2,1,2)
S^ = (2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2,...),
with index sequence (0,2,7,10,15,...)
		

Crossrefs

Programs

  • Mathematica
    seqPosition1[list_, seqtofind_] := If[Length[#] > Length[list], {}, Last[Last[      Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 1]]]] &[seqtofind]; s = Differences[Table[Floor[n*GoldenRatio], {n, 10000}]]; t = {{2}}; p[0] = seqPosition1[s, Last[t]]; s = Drop[s, p[0]]; Off[Last::nolast]; n = 1; While[(p[n] = seqPosition1[s, Last[t]]) > 0, (AppendTo[t, Take[s, {#, # + Length[Last[t]]}]]; s = Drop[s, #]) &[p[n]]; n++]; On[Last::nolast]; t1 = Last[t] (*A246127*)
    q = -1 + Accumulate[Table[p[k], {k, 0, n - 1}]] (*A246128*)

A378398 Rectangular array read by descending antidiagonals: (row 1) = u, and for n >= 2, (row n) = u-inverse runlength sequence of u, where u = A014675 (an infinite Fibonacci word). See Comments.

Original entry on oeis.org

2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2
Offset: 1

Views

Author

Clark Kimberling, Dec 21 2024

Keywords

Comments

If u and v are sequences, both consisting of 1's and 2's, we call v an inverse runlength sequence of u if u is the runlength sequence of v. Each u has two inverse runlength sequences, one with first term 1 and the other with first term 2. Consequently, an inverse runlength array, in which each row after the first is an inverse runlength sequence of the preceding row, is determined by its first column. Generally, if the first column is periodic with fundamental period p, then the array has p distinct limiting sequences; otherwise, there is no limiting sequence; however, if a segment, of any length, occurs in a row, then it also occurs in a subsequent row. See A378282 for details and related sequences.

Examples

			The corner of the array begins:
     2  1  2  2  1  2  1  2  2  1  2  2  1  2  1  2  2  1  2  1  2
     1  1  2  1  1  2  2  1  2  2  1  2  2  1  1  2  1  1  2  2  1
     2  1  2  2  1  2  1  1  2  2  1  2  2  1  1  2  1  1  2  2  1
     2  2  1  2  2  1  1  2  1  1  2  1  2  2  1  1  2  1  1  2  2
     1  1  2  2  1  2  2  1  1  2  1  2  2  1  2  1  1  2  1  1  2
     2  1  2  2  1  1  2  1  1  2  2  1  2  1  1  2  1  1  2  2  1
     1  1  2  1  1  2  2  1  2  1  1  2  1  2  2  1  1  2  1  1  2
     2  1  2  2  1  2  1  1  2  2  1  2  2  1  2  1  1  2  1  1  2
     2  2  1  2  2  1  1  2  1  1  2  1  2  2  1  1  2  1  1  2  2
     1  1  2  2  1  2  2  1  1  2  1  2  2  1  2  1  1  2  1  1  2
     2  1  2  2  1  1  2  1  1  2  2  1  2  1  1  2  1  1  2  2  1
     2  2  1  2  2  1  1  2  1  2  2  1  2  1  1  2  2  1  2  2  1
		

Crossrefs

Programs

  • Mathematica
    invRE[seq_, k_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &,
        Partition[Riffle[seq, {k, 2 - Mod[k + 1, 2]}, {2, -1, 2}], 2]]];
    row1 = SubstitutionSystem[{1 -> {2}, 2 -> {2, 1}}, {1}, {7}][[1]] (* A014675 *);
    rows = {row1}; col = Take[row1, 12];
    Do[AppendTo[rows, Take[invRE[Last[rows], col[[n]]], Length[row1]]], {n, 2, Length[col]}]
    rows // ColumnForm  (* array *)
    w[n_, k_] := rows[[n]][[k]]; Table[w[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* sequence *)
    (* Peter J. C. Moses, Nov 20 2024 *)

A245975 Decimal expansion of the number whose continued fraction is the (2,1)-version of the infinite Fibonacci word A014675.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The (2,1)-version of the infinite Fibonacci word, A014675, as a sequence, is (2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2,...); see Example.

Examples

			[2,1,2,2,1,2,1,2,2,...] = 2.702938358022510294445050974693003734532...
		

Crossrefs

Programs

  • Mathematica
    z = 300; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind]; x = GoldenRatio;  s =  Differences[Table[Floor[n*x], {n, 1, z^2}]];  (* A014675 *)
    x1 = N[FromContinuedFraction[s], 100]
    r1 = RealDigits[x1, 10]  (* A245975 *)
    ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[1]]}];
    cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}];
    rcf = Last[Map[Reverse, cfs]]  (* A245920 *)
    x2 = N[FromContinuedFraction[rcf], z]
    r2 = RealDigits[x2, 10] (* A245976 *)

A339949 a(n) is the greatest runlength in all n-sections of the infinite Fibonacci word A014675.

Original entry on oeis.org

2, 3, 5, 6, 7, 3, 2, 12, 4, 4, 4, 4, 18, 2, 3, 6, 20, 5, 3, 2, 30, 4, 3, 4, 4, 9, 2, 3, 9, 4, 4, 3, 4, 47, 2, 3, 5, 10, 6, 3, 2, 15, 4, 4, 4, 4, 13, 2, 3, 7, 8, 5, 3, 2, 77, 4, 3, 5, 6, 8, 3, 2, 10, 4, 4, 3, 4, 24, 2, 3, 6, 78, 6, 3, 2, 22, 4, 3, 4, 4, 11, 2
Offset: 1

Views

Author

Clark Kimberling, Dec 26 2020

Keywords

Comments

Equivalently a(n) is the greatest runlength in all n-sections of the infinite Fibonacci word A003849.
From Jeffrey Shallit, Mar 23 2021: (Start)
We know that the Fibonacci word has exactly n+1 distinct factors of length n.
So to verify a(n) we simply verify there is a monochromatic arithmetic progression of length a(n) and difference n by examining all factors of length (n*a(n) - n + 1) (and we know when we've seen all of them). Next we verify there is no monochromatic AP of length a(n)+1 and difference n by examining all factors of length n*a(n) + 1.
Again, we know when we've seen all of them. (End)

Examples

			For n  >= 1,  r =  0..n, k >= 0, let A014675(n*k+r) denote the k-th term of the r-th n-section of A014675; i.e.,
(A014675(k)) = 212212122122121221212212212122122121221212212212122121...
  has runlengths 1,1,2,1,1,1,2,1,2,1,...; a(1) = 2.
(A014675(2k)) = 22112211222122212221122112221222122211221122112221222...
  has runlengths 2,2,2,2,3,1,3,1,3,2,...
(A014675(2k+1)) = 122212221122112211222122211221122112221222122211221...
   has runlengths 1,3,1,3,2,2,2,2,2,3,...; a(2) = 3.
(A014675(3k)) = 22111222211122221122222112222211222211122221112222111...
  has runlengths 2,3,4,3,4,2,5,2,5,2,4,3,4,3,...
(A014675(3k+1)) = 112222111222211122221112222111222211222221122221112...
  has runlengths 2,4,3,4,3,4,3,4,3,4,,5,2,4,3,...
(A014675(3k+2)) = 222211222221122221112222111222211122221112222112222...
  has runlengths 4,2,5,2,4,3,4,3,4,3,4,3,4,2,...; a(3) = 5.
		

Crossrefs

Programs

  • Mathematica
    r = (1 + Sqrt[5])/2; z = 4000;
    f[n_] := Floor[(n + 2) r] - Floor[(n+1) r];  (* A014675 *)
    t = Table[Max[Map[Length,Union[Split[Table [f[n m], {n, 0, Floor[z/m]}]]]]], {m, 1, 20}, {n, 1, m}];
    Map[Max, t] (* A339949 *)
  • PARI
    phi = quadgen(5);
    g(n) = min(frac(n * phi), 1 - frac(n * phi));
    a(n) = if (g(n) <= (1 / phi)^2, ceil((1 / phi) / g(n)), 2*ceil(((1 / phi) - g(n)) / g(2 * n))); \\ Gandhar Joshi, Jan 14 2025

Formula

From Gandhar Joshi, Jan 14 2025: (Start)
phi = the golden ratio. g(n) = min {n*phi mod 1, 1 - (n*phi mod 1)}.
If g(n) <= (phi)^(-2), a(n) = ceiling{((phi)^(-1))/g(n)};
otherwise, a(n) = 2*ceiling{((phi)^(-1)-g(n))/g(2n)}. (End)

Extensions

a(61) corrected by Jeffrey Shallit, Mar 23 2021

A245977 Limit-reverse of the infinite Fibonacci word A014675 = (s(0),s(1),...) = (2,1,2,2,1,2,1,2, ...) using initial block (s(2),s(3)) = (2,2).

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2
Offset: 0

Views

Author

Keywords

Comments

Suppose, as in A245920, that S = (s(0),s(1),s(2),...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m-k),s(m-k+1),...,s(m)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i-k), s(i-k+1),...,s(i)) = B(m,k), and put B(m(1),k+1) = (s(m(1)-k-1),s(m(1)-k),...,s(m(1))). Let m(2) be the least i > m(1) such that (s(i-k-1),s(i-k),...,s(i)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)-k-2),s(m(2)-k-1),...,s(m(2))). Continuing in this manner gives a sequence of blocks B(m(n),k+n). Let B'(n) = reverse(B(m(n),k+n)), so that for n >= 1, B'(n) comes from B'(n-1) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limit-reverse of S with initial block B(m,k)", denoted by S*(m,k), or simply S*.
...
The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-reversing S with initial block B(m,k)" or simply the index sequence for S*, as in A245921 and A245978.
Apparently a(n) = A082389(n+2) = A059426(n+1). - R. J. Mathar, Sep 01 2014

Examples

			S = the infinite Fibonacci word A014675, with B = (s(2), s(3)); that is, (m,k) = (2,3)
S = (2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...)
B'(0) = (2,2)
B'(1) = (2,2,1)
B'(2) = (2,2,1,2)
B'(3) = (2,2,1,2,1)
B'(4) = (2,2,1,2,1,2)
B'(5) = (2,2,1,2,1,2,2)
S* = (2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,1,...), with index sequence (3,8,11,16,21,29,...)
		

Crossrefs

Programs

  • Mathematica
    z = 100; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind]; x = GoldenRatio; s = Differences[Table[Floor[n*x], {n, 1, z^2}]]; ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[3]], s[[4]]}]; (* Initial block is (s(3),s(4)) [OR (s(2),s(3)) if using offset 0] *); cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}]; rcf = Last[Map[Reverse, cfs]] (* A245977 *)

A245978 Index sequence for limit-reversing the infinite Fibonacci word A014675 = (s(0),s(1),...) = (2,1,2,2,1,2,1,2,...) using initial block (s(2),s(3)) = (2,2).

Original entry on oeis.org

3, 8, 11, 16, 21, 29, 37, 42, 50, 63, 71, 84, 92, 105, 118, 126, 139, 152, 173, 194, 207, 228, 249, 262, 283, 296, 317, 338, 351, 372, 406, 427, 461, 482, 516, 550, 571, 605, 626, 660, 694, 715, 749, 783, 804, 838, 859, 893, 927, 948, 982, 1016, 1071, 1126
Offset: 0

Views

Author

Keywords

Comments

Suppose, as in A245920, that S = (s(0),s(1),s(2),...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m-k),s(m-k+1),...,s(m)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i-k),s(i-k+1),...,s(i)) = B(m,k), and put B(m(1),k+1) = (s(m(1)-k-1),s(m(1)-k),...,s(m(1))). Let m(2) be the least i > m(1) such that (s(i-k-1),s(i-k),...,s(i)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)-k-2),s(m(2)-k-1),...,s(m(2))). Continuing in this manner gives a sequence of blocks B(m(n),k+n). Let B'(n) = reverse(B(m(n),k+n)), so that for n >= 1, B'(n) comes from B'(n-1) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limit-reverse of S with initial block B(m,k)", denoted by S*(m,k), or simply S*.
...
The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-reversing S with initial block B(m,k)" or simply the index sequence for S*, as in A245921 and A245978.

Examples

			S = the infinite Fibonacci word A014675, with B = (s(2), s(3)); that is, (m,k) = (2,3)
S = (2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,...)
B'(0) = (2,2)
B'(1) = (2,2,1)
B'(2) = (2,2,1,2)
B'(3) = (2,2,1,2,1)
B'(4) = (2,2,1,2,1,2)
B'(5) = (2,2,1,2,1,2,2)
S* = (2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,1,...), with index sequence (3,8,11,16,21,29,...)
		

Crossrefs

Programs

  • Mathematica
    z = 140; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind]; x = GoldenRatio; s = Differences[Table[Floor[n*x], {n, 1, z^2}]]; ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[3]], s[[4]]}]; (* Initial block is (s(3),s(4)) [OR (s(2),s(3)) if using offset 0] *)
    cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}]; q = Join[{3}, Rest[Accumulate[Join[{1}, Table[p[n], {n, 0, z}]]]]] (* A245978 *)
    q1 = Differences[q]  (* A245979 *)

A339950 Numbers k such that all k-sections of the infinite Fibonacci word A014675 have just two different run-lengths.

Original entry on oeis.org

1, 7, 14, 20, 27, 35, 41, 48, 54, 62, 69, 75, 82, 90, 96, 103, 109, 117, 124, 130, 137, 143, 151, 158, 164, 171, 179, 185, 192, 198, 206, 213, 219, 226, 234, 240, 247, 253, 260, 268, 274, 281, 287, 295, 302, 308, 315, 323, 329, 336, 342, 350, 357, 363, 370, 376, 384, 391, 397, 404
Offset: 1

Views

Author

Clark Kimberling, Dec 26 2020

Keywords

Comments

Equivalent definition: these are the numbers n such that all n-sections of the infinite Fibonacci word A003849 have just two run-lengths.
The distinct terms of the difference sequence of the first 40 terms are 6, 7, and 8.
Conjecture: a(n) = A189378(n-1)+1 for n >= 2. - Don Reble, Apr 06 2021.
"All n-sections" means all subsequences S(k) = (A014675(n*i+k); i = 0, 1, 2, ...), for k = 0, ..., n-1. "Run-lengths" means the numbers of consecutive equal terms in the sequence: see examples. - M. F. Hasler, Apr 07 2021

Examples

			Let W = A014675, so that as a word, W = 21221212212212122121221221212212212122121221221...
The unique 1-section of W is W itself, which is a concatenation of runs 1, 2, and 22, so that a(1) = 2. The sequence A339949 shows that a(n) > 2 for n = 2,3,4,5,6. For n = 7, the n-section of W that starts with its first letter, 2, is 221221221221221221221221221221221221121..., in which the runs are 22, 1, 11, supporting the conjecture that a(2) = 7.
Some run-lengths may appear quite late. For example, when n = 68, the third run-length appears in the n-section S(k=0) only with the 2829th element, corresponding to the 192372-th element of the original sequence. - _M. F. Hasler_, Apr 07 2021
		

Crossrefs

Programs

  • Mathematica
    r = (1 + Sqrt[5])/2; z = 80000;
    f[n_] := Floor[(n + 1) r] - Floor[n r];  (* A014675 *)
    t = Table[Max[Map[Length,
         Union[Split[Table [f[n d], {n, 0, Floor[z/d]}]]]]], {d, 1,
        400}, {n, 1, d}];
    u = Map[Max, t]
    Flatten[Position[u, 2]]  (* A339950 *)

Extensions

More terms from Don Reble, Apr 13 2021
Showing 1-10 of 45 results. Next