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.

A214212 Number of right special factors of length n in the Thue-Morse sequence A010060.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 10 2012

Keywords

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Programs

  • Maple
    ph:=proc(n) option remember;
    if n=2 then 2 elif n<=3 then n+1 else if n mod 2 = 0 then ph(n/2) else ph((n+1)/2); fi;
    fi; end;
  • Mathematica
    ph[n_] := ph[n] = If[n == 2, 2, If[n <= 3, n+1, If[Mod[n, 2] == 0, ph[n/2], ph[(n+1)/2]]]];
    ph /@ Range[0, 120] (* Jean-François Alcover, Jun 18 2020, after Maple *)

Formula

A005942(n+1) - A005942(n). - Michel Dekking, Sep 28 2020

Extensions

Name clarified by Michel Dekking, Sep 28 2020