login
A324657
a(n) is the number of successive primorials A002110(i) larger than prime(n) that need to be tried before sum prime(n)+A002110(i) is found to be composite.
3
0, 0, 1, 1, 1, 2, 2, 0, 3, 4, 2, 0, 5, 0, 2, 1, 1, 3, 3, 2, 5, 0, 3, 0, 1, 2, 1, 4, 0, 0, 2, 0, 2, 1, 2, 0, 3, 2, 0, 1, 1, 0, 1, 0, 0, 1, 2, 0, 0, 2, 1, 2, 3, 0, 0, 0, 1, 0, 0, 1, 4, 0, 1, 2, 0, 0, 0, 4, 1, 1, 1, 0, 1, 2, 1, 1, 1, 3, 2, 1, 2, 1, 1, 0, 2, 1, 0, 1, 0, 0, 2, 4, 2, 1, 0, 0, 3, 0, 4, 1, 3, 0, 0, 1, 0
OFFSET
1,6
COMMENTS
See comments and examples in A324656.
FORMULA
a(n) = A324656(A000040(n)).
PROG
(PARI)
A002110(n) = prod(i=1, n, prime(i));
A235224(n, p=2) = if(!n, n, 1+A235224(n\p, nextprime(p+1)));
A324656(n) = { my(k=0, b=A235224(n)); while(isprime(n+A002110(b+k)), k++); (k); };
A324657(n) = A324656(prime(n));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 11 2019
STATUS
approved