[go: up one dir, main page]

login
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).
4

%I #18 Jun 28 2019 21:15:57

%S 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,

%T 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,

%U 9,10,13,9,15,11,5,15,13,8,15,12,5,14,13,8

%N 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).

%C The sequence o corresponds to the ordinal transform of the sequence a.

%C This sequence has a taste of Fibonacci, as each pair of consecutive terms gives rise to the next term.

%C This sequence is unbounded:

%C - if the sequence was bounded, say a(n) <= M for any n > 0, then some value in the range 1..M, say t, would appear at least M times among the first M^2 terms, and we would have a value > M after the M-th occurrence of t, a contradiction.

%C This sequence has interesting graphical features (see Links section).

%H Rémy Sigrist, <a href="/A306246/b306246.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A306246/a306246.png">Density plot of the first 10000000 terms</a>

%e The first terms, alongside o, are:

%e n a(n) o(n)

%e -- ---- ----

%e 1 1 1

%e 2 2 1

%e 3 2 2

%e 4 3 1

%e 5 3 2

%e 6 3 3

%e 7 5 1

%e 8 4 1

%e 9 2 3

%e 10 4 2

%e 11 5 2

%e 12 4 3

%e 13 5 3

%e 14 6 1

%e 15 4 4

%e 16 5 4

%e 17 8 1

%e 18 5 5

%e 19 6 2

%e 20 7 1

%o (PARI) o = vector(18); for (n=1, 79, if (n<=2, v=n, v=pp+p); print1 (v ", "); [pp,p]=[p,o[1+v]++])

%Y See A306251 for the ordinal transform of this sequence.

%K nonn

%O 1,2

%A _Rémy Sigrist_, Jan 31 2019