login
A335017
a(1) = 1 and for n > 0, a(n+1) is the number of k such that a(n) == a(k) (mod k) for all k = 1..n-1.
1
1, 0, 1, 1, 2, 2, 3, 1, 3, 2, 4, 3, 3, 4, 4, 5, 2, 5, 3, 5, 4, 6, 2, 6, 3, 6, 4, 7, 3, 7, 4, 8, 3, 8, 4, 9, 3, 9, 4, 10, 4, 11, 1, 4, 12, 5, 5, 6, 5, 7, 5, 8, 5, 9, 5, 10, 5, 11, 2, 7, 6, 6, 7, 7, 8, 6, 8, 7, 9, 6, 9, 7, 10, 6, 10, 7, 11, 3, 10, 8, 8, 9, 8, 10
OFFSET
1,5
COMMENTS
It is not known how fast this sequence grows or if it includes every number.
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
Sequence in context: A171691 A088904 A241568 * A047972 A004595 A071681
KEYWORD
nonn
AUTHOR
Joseph Bove, May 19 2020
STATUS
approved