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.
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
Offset: 1
Keywords
Examples
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
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, Colored scatterplot of the first 10000 terms (where the color denotes the parity of n)
Programs
-
PARI
o = vector(7); v=0; for (n=1, 87, print1 (v", "); v=o[1+v]++\3)
Comments