OFFSET
0,2
LINKS
N. Rampersad and M. Stipulanti, The Formal Inverse of the Period-Doubling Sequence, arXiv preprint arXiv:1807.11899 [math.CO], 2018.
MATHEMATICA
a[0] = 1;
a[n_] :=
Module[{m, u, i},
u[0] = 0; u[1] = 1; u[2] = 0; u[3] = 0;
u[i_] := If[EvenQ[i], 0, If[IntegerQ[(i - 1)/4], u[2 ((i - 1)/4) - 1], u[(i - 3)/4]]];
m = a[n - 1] + 1;
While[u[m] == 0, m++];
m
]
CROSSREFS
KEYWORD
nonn
AUTHOR
Manon Stipulanti, Jul 30 2018
STATUS
approved