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

A248105 Positions of 1,0,1 in the Thue-Morse sequence (A010060).

Original entry on oeis.org

3, 12, 15, 20, 27, 36, 43, 48, 51, 60, 63, 68, 75, 80, 83, 92, 99, 108, 111, 116, 123, 132, 139, 144, 147, 156, 163, 172, 175, 180, 187, 192, 195, 204, 207, 212, 219, 228, 235, 240, 243, 252, 255, 260, 267, 272, 275, 284, 291, 300, 303, 308, 315, 320, 323
Offset: 1

Views

Author

Clark Kimberling, Oct 01 2014

Keywords

Comments

Every positive integer lies in exactly one of these six sequences:
A248056 (positions of 0,0,1)
A248104 (positions of 0,1,0)
A157970 (positions of 1,0,0)
A157971 (positions of 0,1,1)
A248105 (positions of 1,0,1)
A248057 (positions of 1,1,0)

Examples

			Thue-Morse sequence:  0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,..., so that a(1) = 3 and a(2) = 12.
		

Crossrefs

Programs

  • Mathematica
    z = 600; u = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 13]; v = Rest[u]; w = Rest[v]; t1 = Table[If[u[[n]] == 0 && v[[n]] == 0 && w[[n]] == 1, 1, 0], {n, 1, z}];
    t2 = Table[If[u[[n]] == 0 && v[[n]] == 1 && w[[n]] == 0, 1, 0], {n, 1, z}];
    t3 = Table[If[u[[n]] == 1 && v[[n]] == 0 && w[[n]] == 0, 1, 0], {n, 1, z}];
    t4 = Table[If[u[[n]] == 0 && v[[n]] == 1 && w[[n]] == 1, 1, 0], {n, 1, z}];
    t5 = Table[If[u[[n]] == 1 && v[[n]] == 0 && w[[n]] == 1, 1, 0], {n, 1, z}];
    t6 = Table[If[u[[n]] == 1 && v[[n]] == 1 && w[[n]] == 0, 1, 0], {n, 1, z}];
    Flatten[Position[t1, 1]]  (* A248056 *)
    Flatten[Position[t2, 1]]  (* A248104 *)
    Flatten[Position[t3, 1]]  (* A157970 *)
    Flatten[Position[t4, 1]]  (* A157971 *)
    Flatten[Position[t5, 1]]  (* A248105 *)
    Flatten[Position[t6, 1]]  (* A248057 *)

A381848 Sequence obtained by replacing 3-term subwords of A010060 by 0,1,2,3,4,5 as described in Comments.

Original entry on oeis.org

2, 5, 4, 1, 3, 0, 2, 5, 3, 0, 1, 4, 2, 5, 4, 1, 3, 0, 1, 4, 2, 5, 3, 0, 2, 5, 4, 1, 3, 0, 2, 5, 3, 0, 1, 4, 2, 5, 3, 0, 2, 5, 4, 1, 3, 0, 1, 4, 2, 5, 4, 1, 3, 0, 2, 5, 3, 0, 1, 4, 2, 5, 4, 1, 3, 0, 1, 4, 2, 5, 3, 0, 2, 5, 4, 1, 3, 0, 1, 4, 2, 5, 4, 1, 3, 0
Offset: 1

Views

Author

Clark Kimberling, May 28 2025

Keywords

Comments

The six 3-term subwords of A010060 are 0,0,1; 0,1,0; 0,1,1; 1,0,0; 1,0,1; 1,1,0. These are coded as 0,1,2,3,4,5 respectively, and then these numbers replace the corresponding subwords in A010060. The positions of 0,1,2,3,4,5 are given by A248956, A248104, A157971, A157970, A248105, A248057, respectively.

Examples

			Starting with A010060 = (0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0,...), the successive 3-term subwords are 0,1,1; 1,1,0; 1,0,1; 0,1,0; 1,0,0 ..., which code as 2,5,4,1,3,... .
		

Crossrefs

Programs

  • Mathematica
    Partition[ThueMorse[Range[0, 200]], 3, 1] /. Thread[{{0, 0, 1}, {0, 1, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}} -> {0, 1, 2, 3, 4, 5}]  (* Peter J. C. Moses, May 22 2025 *)
Showing 1-2 of 2 results.