OFFSET
0,3
COMMENTS
Inspired by A316774.
Let b(n) = n for n < 3, b(n) = b(freq(b(n-1),n)) for n >= 3, where freq(i, j) is the number of times i appears in the first j terms and b(n) has offset 0. For n >= 1, b(n) - 1 are 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, ... (cf. A093879). While b(n) has one parent spot, this entry (a(n)) has two parent spots which are freq(a(n-1),n) and freq(a(n-2),n).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..65536
MAPLE
b:= proc() 0 end:
a:= proc(n) option remember; local t;
t:= `if`(n<2, n, a(b(a(n-1)))+a(b(a(n-2))));
b(t):= b(t)+1; t
end:
seq(a(n), n=0..200); # Alois P. Heinz, Jul 19 2018
MATHEMATICA
Nest[Append[#, #[[Count[#, #[[-1]] ] + 1]] + #[[Count[#, #[[-2]] ] + 1 ]] ] &, {0, 1}, 95] (* Michael De Vlieger, Jul 20 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jul 19 2018
STATUS
approved