

A329981


a(1) = 0, and for n > 0, a(n+1) = floor(k / 3) where k is the number of terms equal to a(n) among the first n terms.


5



0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 1, 3, 0, 2, 2, 2, 2, 3, 0, 3, 1, 3, 1, 3, 1, 4, 0, 3, 2, 3, 2, 3, 2, 4, 0, 3, 3, 3, 3, 4, 1, 4, 1, 4, 1, 5, 0, 4, 2, 4, 2, 4, 2, 5, 0, 4, 3, 4, 3, 4, 3, 5, 1, 5, 1, 5, 1, 6, 0, 4, 4, 4, 4, 5, 2, 5, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,12


COMMENTS

In other words, for n > 0, a(n+1) = floor(o(n) / 3) where o is the ordinal transform of the sequence.
Every nonnegative number appears infinitely many times in the sequence.
The second difference of the positions of the zeros in the sequence appears to be eventually 6periodic.


LINKS



EXAMPLE

The first terms, alongside their ordinal transform, are:
a a(n) o(n)
  
1 0 1
2 0 2
3 0 3
4 1 1
5 0 4
6 1 2
7 0 5
8 1 3
9 1 4
10 1 5
11 1 6
12 2 1


PROG

(PARI) o = vector(7); v=0; for (n=1, 87, print1 (v", "); v=o[1+v]++\3)


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



