OFFSET
1,1
FORMULA
Limit_{N->oo} (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} prime(n)) = 3/2.
MATHEMATICA
a[n_] := Module[{p = Prime[n + 1], pr = Product[Prime[i], {i, 1, n}]}, While[! PrimeQ[p*pr + 1], p = NextPrime[p]]; p]; Array[a, 100] (* Amiram Eldar, Aug 12 2023 *)
PROG
(PARI) a(n) = my(p=nextprime(prime(n)+1), P=vecprod(primes(n))); while (!ispseudoprime(p*P+1), p=nextprime(p+1)); p; \\ Michel Marcus, Aug 13 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Alain Rocchelli, Aug 12 2023
STATUS
approved