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

A277731 Fixed point of the morphism 0 -> 01, 1 -> 012, 2 -> 0; starting with a(1) = 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 07 2016

Keywords

Comments

After k = 0,1,2,3,... applications of the morphism we have 0, 01, 01012, 01012010120, ... which have lengths 1, 2, 5, 11, 24, 53, 117, ..., satisfying b(n) = 2*b(n-1) + b(n-3) (cf. A052980).

Crossrefs

Programs

  • Maple
    with(ListTools);
    T:=proc(S) Flatten(subs( {0=[0,1], 1=[0,1,2], 2=[0]}, S)); end;
    S:=[0];
    for n from 1 to 10 do S:=T(S); od:
    S;
  • Mathematica
    m = 100; (* number of terms required *)
    S[1] = {0};
    S[n_] := S[n] = SubstitutionSystem[{0 -> {0, 1}, 1 -> {0, 1, 2}, 2 -> {0}}, S[n-1]];
    For[n = 2, True, n++, If[PadRight[S[n], m] == PadRight[S[n-1], m], Print["n = ", n]; Break[]]];
    Take[S[n], m] (* Jean-François Alcover, Mar 20 2023 *)

A277732 Positions of 0's in A277731.

Original entry on oeis.org

1, 3, 6, 8, 11, 12, 14, 17, 19, 22, 23, 25, 27, 30, 32, 35, 36, 38, 41, 43, 46, 47, 49, 51, 54, 56, 59, 61, 64, 65, 67, 70, 72, 75, 76, 78, 80, 83, 85, 88, 89, 91, 94, 96, 99, 100, 102, 104, 107, 109, 112, 114, 117, 118, 120, 123, 125, 128, 129, 131, 134, 136, 139, 140, 142, 144, 147, 149, 152, 153
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2016

Keywords

Comments

{A277732, A277733, A277734} forms a three-way partition of the positive integers, similar to {A003144, A003145, A003146}.

Crossrefs

Programs

  • Maple
    with(ListTools);
    T:=proc(S) Flatten(subs( {0=[0,1], 1=[0,1,2], 2=[0]}, S)); end;
    S:=[0];
    for n from 1 to 14 do S:=T(S); od:
    S; # A277731
    p0:=[]: p1:=[]: p2:=[]:
    for i from 1 to nops(S) do
    j:=S[i];
    if j=0 then p0:=[op(p0),i];
    elif j=1 then p1:=[op(p1),i];
    else p2:=[op(p2),i]; fi: od:
    p0; # A277732
    p1; # A277733
    p2; # A277734
  • Mathematica
    m = 1000; (* number of terms of A277731 *)
    S[1] = {0};
    S[n_] := S[n] = SubstitutionSystem[{0 -> {0, 1}, 1 -> {0, 1, 2}, 2 -> {0}}, S[n - 1]];
    For[n = 2, True, n++, If[PadRight[S[n], m] == PadRight[S[n - 1], m], Print["n = ", n]; Break[]]];
    A277731 = Take[S[n], m];
    Position[A277731, 0] // Flatten (* Jean-François Alcover, Mar 20 2023 *)

A277733 Positions of 1's in A277731.

Original entry on oeis.org

2, 4, 7, 9, 13, 15, 18, 20, 24, 26, 28, 31, 33, 37, 39, 42, 44, 48, 50, 52, 55, 57, 60, 62, 66, 68, 71, 73, 77, 79, 81, 84, 86, 90, 92, 95, 97, 101, 103, 105, 108, 110, 113, 115, 119, 121, 124, 126, 130, 132, 135, 137, 141, 143, 145, 148, 150, 154, 156, 159, 161, 165, 167, 169, 172, 174, 177, 179
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2016

Keywords

Comments

{A277732, A277733, A277734} forms a three-way partition of the positive integers, similar to {A003144, A003145, A003146}.

Crossrefs

Programs

  • Maple
    See A277732.
  • Mathematica
    m = 1000; (* number of terms of A277731 *)
    S[1] = {0};
    S[n_] := S[n] = SubstitutionSystem[{0 -> {0, 1}, 1 -> {0, 1, 2}, 2 -> {0}}, S[n - 1]];
    For[n = 2, True, n++, If[PadRight[S[n], m] == PadRight[S[n - 1], m], Print["n = ", n]; Break[]]];
    A277731 = Take[S[n], m];
    Position[A277731, 1] // Flatten (* Jean-François Alcover, Mar 20 2023 *)
Showing 1-3 of 3 results.