cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Nov 22 2019

Keywords

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.

Examples

			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

Programs

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.