OFFSET
1,5
COMMENTS
It is not known how fast this sequence grows or if it includes every number.
LINKS
Joseph Bove, Table of n, a(n) for n = 1..20000
EXAMPLE
After a(0),...,a(6) = 1, 0, 1, 1, 2, 2, a(7) = 3 because a(1) mod 1 = a(6) mod 1, a(2) mod 2 = a(6) mod 2, and a(5) mod 5 = a(6) mod 5.
MATHEMATICA
Nest[Append[#, Count[Range[Length@ #], k_ /; Mod[#[[-1]], k] == #[[k]] ]] &, {1}, 83] (* Michael De Vlieger, May 24 2020 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = sum(k=1, n-2, Mod(va[n-1]-va[k], k) == 0); ); va; } \\ Michel Marcus, May 20 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph Bove, May 19 2020
STATUS
approved