A306246 a(1) = 1, a(2) = 2, and for any n > 2, a(n) = o(n-1) + o(n-2) where o(k) is the number of occurrences of a(k) among a(1), ..., a(k).
1, 2, 2, 3, 3, 3, 5, 4, 2, 4, 5, 4, 5, 6, 4, 5, 8, 5, 6, 7, 3, 5, 10, 7, 3, 7, 8, 5, 9, 8, 4, 8, 9, 6, 5, 11, 9, 4, 9, 10, 6, 6, 9, 10, 8, 8, 11, 8, 9, 13, 7, 5, 13, 11, 5, 13, 13, 7, 9, 12, 8, 9, 16, 9, 10, 13, 9, 15, 11, 5, 15, 13, 8, 15, 12, 5, 14, 13, 8
Offset: 1
Keywords
Examples
The first terms, alongside o, are: n a(n) o(n) -- ---- ---- 1 1 1 2 2 1 3 2 2 4 3 1 5 3 2 6 3 3 7 5 1 8 4 1 9 2 3 10 4 2 11 5 2 12 4 3 13 5 3 14 6 1 15 4 4 16 5 4 17 8 1 18 5 5 19 6 2 20 7 1
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, Density plot of the first 10000000 terms
Crossrefs
See A306251 for the ordinal transform of this sequence.
Programs
-
PARI
o = vector(18); for (n=1, 79, if (n<=2, v=n, v=pp+p); print1 (v ", "); [pp,p]=[p,o[1+v]++])
Comments