OFFSET
1,1
EXAMPLE
a(9) = 10 because prime(9) = 23 and 23 mod k is only not prime for k in {1, 2, 11, 13, 14, 15, 17, 19, 22, 23}.
a(10) = 16 because prime(10) = 27 and 27 mod k is only not prime for k in {1, 2, 4, 5, 7, 10, 14, 15, 17, 19, 20, 21, 23, 25, 28, 29}.
PROG
(PARI) a(n) = my(p=prime(n)); sum(k=1, p, !isprime(p % k)); \\ Michel Marcus, Jan 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 21 2021
STATUS
approved