OFFSET
0,6
COMMENTS
Subsequence a(A000217(k+1)), k>=0 is an identical copy of the original. Erasure of the first occurrence of every k does not reproduce the original so this is not a fractal sequence. However, if a(0) and the copy subsequence are both erased, what remains is A002260. Hence this sequence contains both a copy identical to the original, and a fractal subsequence different from the original.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
Wikipedia, Fractal sequence
FORMULA
EXAMPLE
a(0)=0 is the first occurrence of the term 0, therefore a(1)=a(0+1)=a(0)=0. a(1)=0 has been seen before, and 0 is the index of the greatest prior term (0), so a(2)=a(1+1)=1-0=1.
MATHEMATICA
Block[{a, c, j, k, m, r, nn}, nn = 120; c[_] := 0; a[0] = j = r = m = 0; Do[If[c[j] == 0, k = a[j], k = n - m - 1]; c[j]++; Set[{a[n], j}, {k, k}]; If[k > r, r = k; m = n], {n, nn}]; Array[a, nn + 1, 0] ] (* Michael De Vlieger, Jun 30 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David James Sycamore, Nov 22 2019
STATUS
approved
