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.

A093914 a(1) = 1; for n > 1, a(n) = curling number of (b(1),...,b(n-1)), where b() = Thue-Morse sequence A010060 (with offset changed to 1).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 26 2004

Keywords

Comments

The curling number of a finite string S = (s(1),...,s(n)) is the largest integer k such that S can be written as xy^k for strings x and y (where y has positive length).
From Andrey Zabolotskiy, Mar 03 2017: (Start)
The sequence consists of 1's and 2's only.
If 2^k>=n-1, then a(n+2^k)>=a(n).
The density of 1's seems to converge to 1/6.
(End)

Crossrefs

Programs

  • Mathematica
    (* Function curlN is defined in A094840 *)
    (* Function ThueMorse needs Mma version >= 11 *)
    a[n_] := If[n == 1, 1, curlN[Array[ThueMorse, n-1, 0]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 18 2024 *)
  • Python
    p, tm, s = 8, 0, 1
    for i in range(p):
        tm += (tm^((1<>(i-j))&((1<>(i-2*j))&((1<Andrey Zabolotskiy, Mar 03 2017