OFFSET
1,3
COMMENTS
Conjecture: This sequence grows logarithmically.
LINKS
Joshua Oliver, Table of n, a(n) for n = 1..4000
Rémy Sigrist, Density plot of the first 10000000 terms
EXAMPLE
a(n)=4 where n=3 because 1 (a(n-1)) has appeared twice before, and 1 (a(n-2)) has appeared twice before as well. 2+2 = 4.
MAPLE
b:= proc(n) option remember; `if`(n=0, 0, b(n-1)+x^a(n)) end:
a:= proc(n) option remember; `if`(n<3, 1, (p->
coeff(p, x, a(n-1))+coeff(p, x, a(n-2)))(b(n-1)))
end:
seq(a(n), n=1..120); # Alois P. Heinz, Nov 24 2019
MATHEMATICA
A={1, 1}; For[n=3, n<=81, n++, A=Append[A, Sum[Count[Table[Part[A, i], {i, 1, n-1}], Part[A, n-k]], {k, 2}]]]; A
PROG
(PARI) o=vector(17); for (n=1, 81, print1 (v=if (n<3, 1, o[pp]+o[p]) ", "); o[v]++; [pp, p]=[p, v]) \\ Rémy Sigrist, Nov 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Joshua Oliver, Nov 24 2019
STATUS
approved