OFFSET
1,1
COMMENTS
a(2n) = A006519(n) and a(2n+1) = b(n), where (b(n))_{n >= 0} is a 2-automatic sequence defined by applying the coding tau(01234) = 24131 to the fixed point of the morphism defined by 0 -> 01, 1 -> 23, 2 -> 04, 3 -> 23, 4 -> 24.
LINKS
Peter Luschny, Table of n, a(n) for n = 1..1000
MAPLE
with(ListTools): with(numtheory):
J := (n, k) -> jacobi(-1, k) <> jacobi(-1, n+k):
a := n -> SelectFirst(k -> J(n, k), [seq(k, k=1..100000)]):
seq(a(n), n=1..86); # Peter Luschny, Dec 02 2019
MATHEMATICA
Block[{nn = 86, s}, s = Array[Boole[EvenQ[((# + 1)/2^IntegerExponent[# + 1, 2] - 1)/2]] &, 3 nn, 0]; Array[Block[{i = 1}, While[s[[i]] == s[[# + i]], i++]; i] &, nn]] (* Michael De Vlieger, Dec 01 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Dec 01 2019
STATUS
approved