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.

A341259 Number of 0's in n-th word defined at A341258.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 16 2021

Keywords

Comments

The number of 1's in the n-th word is given by A117479.

Crossrefs

Appears to be A200649 - 1.

Programs

  • Mathematica
    z = 200; r = (1 + Sqrt[5])/2;
    s = Table[Floor[r*n], {n, 1, z}]; t = Complement[Range[Max[s]], s];
    s1[n_] := Length[Intersection[Range[n - 1], s]];
    t1[n_] := n - 1 - s1[n];
    w[1] = {0}; w[t[[1]]] = {1};
    w[n_] := If[MemberQ[s, n], Join[{0}, w[s1[n]]], Join[{1}, w[t1[n]]]]
    tt = Table[w[n], {n, 1, z}] (* A341258 *)
    c[n_] := Count[tt[[n]], 0]; Table[c[n], {n, 1, z}]  (* A341259 *)
    d[n_] := Count[tt[[n]], 1]; Table[d[n], {n, 1, z}]  (* A117479 *)