OFFSET
0,3
COMMENTS
LINKS
Rémy Sigrist, C program for A330416
Rémy Sigrist, Density plot of the first 100000000 terms
EXAMPLE
a(0) = 0.
a(1) = 1.
a(2) = 2.
For n = 3:
- a(1) = 1 has appeared once, a(0) = 0 has appeared once,
- hence a(3) = 1+1 = 2.
For n = 4:
- a(2) = 2 has appeared twice, a(1) = 1 has appeared once,
- hence a(4) = 2+1 = 3.
MATHEMATICA
Nest[Append[#, Count[#, #[[-2]] ] + Count[#, #[[-3]] ]] &, {0, 1, 2}, 77] (* Michael De Vlieger, Dec 14 2019 *)
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 14 2019
STATUS
approved