OFFSET
1,2
LINKS
Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^20, with a color function representing the number k of appearances of m in a(n), where red represents the first appearance of m, and magenta the maximum number of appearances of m in a(1..2^20).
MATHEMATICA
nn = 120; c = k = 1; Do[Do[Set[b[k], #[[j]]]; If[b[k] == 1, Set[a[k], c]; c++, Set[a[k], a[k - c + 1]]]; k++, {j, Length[#]}] &@ IntegerDigits[n, 2], {n, nn}]; Array[a[#] &, k - 1] (* Michael De Vlieger, Aug 03 2022 *)
CROSSREFS
KEYWORD
AUTHOR
Michael De Vlieger and David James Sycamore, Aug 03 2022
STATUS
approved