login
A329221
a(0)=0. If a(n)=k is the first occurrence of k then a(n+1)=a(k), otherwise a(n+1)=n-m where m is the index of the greatest prior term.
0
0, 0, 1, 0, 1, 2, 1, 1, 2, 3, 0, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 1, 2, 3, 4, 5, 6, 7, 8
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.
FORMULA
a(k) = a(A000217(k+1)), k >= 0.
The n-th occurrence of k is a((k^2 + (2*n+1)*k + n*(n-1))/2), k >= 1.
The n-th occurrence of 0 is a(A072638(n)), n >= 0.
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.
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved