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.

A270788 Unique fixed point of the 3-symbol Fibonacci morphism phi-hat_2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 30 2016

Keywords

Comments

Fixed point of the morphism phi-hat_2 given by 1 --> 12, 2 --> 3, 3 --> 12. [Joerg Arndt, Apr 10 2016]
This sequence is the [0->12, 1->3]-transform of the Fibonacci word A003849: if T(0):=12, T(1):=3, then one proves easily with induction that T(phi_1^n(0)) = phi-hat_2^{n+1}(1), and T(phi_1^n(1)) = phi-hat_2^{n+1}(2), where phi_1 denotes the Fibonacci morphism given by 0 --> 01, 1 --> 0. - Michel Dekking, Dec 29 2019

Crossrefs

Cf. A159917 (same sequence if we map 1->2, 2->0, 3->1).

Programs

  • Maple
    with(ListTools);
    psi:=proc(S)
    Flatten(subs( {1=[1,2], 2=[3], 3=[1,2]}, S));
    end;
    S:=[1];
    for n from 1 to 10 do S:=psi(S): od:
    S;
  • Mathematica
    m = 121; (* number of terms required *)
    S[1] = {1};
    S[n_] := S[n] = SubstitutionSystem[{1 -> {1, 2}, 2 -> {3}, 3 -> {1, 2}}, 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, Feb 15 2023 *)
  • Python
    from math import isqrt
    def A270788(n): return (1,3,2)[((m:=(n+2+isqrt(5*(n+2)**2)>>1)-n-2)+isqrt(5*m**2)>>1)-((k:=(n+1+isqrt(5*(n+1)**2)>>1)-n-1)+isqrt(5*k**2)>>1)] # Chai Wah Wu, May 22 2025

Formula

Let A(n)=floor(n*tau), B(n)=n+floor(n*tau), i.e., A and B are the lower and upper Wythoff sequences, A=A000201, B=A001950. Then a(n)=1 if n=A(A(k)) for some k; a(n)=2 if n=B(k) for some k; a(n)=3 if n=A(B(k)) for some k. - Michel Dekking, Dec 27 2016

Extensions

More terms from Joerg Arndt, Apr 10 2016
Offset changed to 1 by Michel Dekking, Dec 27 2016

A242082 Nim sequence of game on n counters whose legal moves are removing some number of counters in A027941.

Original entry on oeis.org

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

Views

Author

Nathan Fox, May 03 2014

Keywords

Comments

Aperiodic, ternary sequence.
Result of applying the map 0->01, 1->2 to A188432.
Let w(1)=01. For all i>1, let w(i)=w(i-1)w(i-1)w(i-2)...w(2)w(1)2 (as a concatenation of words). The limit of this process is this sequence.
Also the Nim sequence of game on n counters whose legal moves are removing either 1 counter or some number of counters in A089910.
a(n+2) = A159917(n), the infinite Fibonacci sequence on {0,1,2}. See also the standard form A270788 of A159917, explaining the formula below. - Michel Dekking, Dec 27 2016

Crossrefs

Formula

a(n)=0 if and only if n=0 or n is in A001950.
a(n)=1 if and only if a(n-1)=0, which happens if and only if n is in A026352.
a(n)=2 if and only if n is in A089910.
Showing 1-2 of 2 results.