OFFSET
0,4
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..16384
Michael De Vlieger, Log log scatterplot of a(n) and b(n), n = 1..2^14, b(n) = A359207(n) in dark blue, a(n) in red, highlighting where a(n) = b(n) in green.
EXAMPLE
a(0) = 0 since n = 0.
a(1) = 1 since S(1) = {1, 0}, but m = 0 appeared in S(0).
a(2) = 1 since S(2) = {2, 1, 0}, but m = 1 appeared in S(1).
a(3) = 11 since S(3) = {3, 6, 13, 24, 55, 90, 241, 300, 123, 142, 85, 0}, but m = 0 appeared in S(0).
a(4) = 1 since S(4) = {4, 3, ...} but 3 appears in S(3), etc.
MATHEMATICA
c[_] = -1; c[0] = 0; f[n_] := FromDigits[BitXor[1, IntegerDigits[3*n, 2]], 2]; Table[(Map[If[c[#1] == -1, Set[c[#1], #2]] & @@ # &, Partition[#, 2, 1]]; -1 + Length[#]) &@ NestWhileList[f, n, c[#] == -1 &], {n, 0, 120}]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Michael De Vlieger, Dec 21 2022
STATUS
approved