OFFSET
1,2
COMMENTS
Assuming a(12) exists it is greater than 2.25 million.
EXAMPLE
a(1) = 0 as prime(1) + 1 = 2 + 1 = 3, which is divisible by prime(2) = 3.
a(3) = 14 as prime(3) * ... * prime(17) + 1 = 320460058359035439846, which is divisible by prime(18) = 61.
a(10) = 277856 as prime(10) * ... * prime(277866) + 1 = 645399...451368 (a number with 1701172 digits), which is divisible by prime(277867) = 3919259.
a(11) = 1 as prime(11) * prime(12) + 1 = 31 * 37 + 1 = 1148, which is divisible by prime(13) = 41.
PROG
(Python)
from sympy import prime, nextprime
def A360376(n):
p = prime(n)
s, k = p, 0
while (s+1)%(p:=nextprime(p)):
k += 1
s *= p
return k # Chai Wah Wu, Feb 07 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Scott R. Shannon, Feb 04 2023
STATUS
approved