A160434 a(n) is the least number k such that (k-th prime after A002110(n)+1) - A002110(n) is not a prime, where A002110(n) is the n-th primorial.
2, 3, 7, 11, 20, 26, 30, 37, 43, 44, 42, 64, 66, 46, 70, 87, 99, 91, 78, 95, 133, 119, 113, 133, 121, 132, 134, 151, 129, 204, 221, 164, 176, 162, 177, 169, 172, 207, 234, 237, 251, 202, 231, 294, 271, 298, 284, 257, 254, 273, 319, 267, 278, 297, 309, 350, 354
Offset: 0
Keywords
Examples
a(3)=11: A002110(3)+1=2*3*5+1=31. The 11 primes after 31 are 37, 41, 43, 47, 53, 59, 61, 67, 71, 73 and 79. Subtracting 2*3*5=30 from each yields: 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 49. These are primes except for the 11th value, which is 49=7^2.
Programs
-
Maple
a(n):=proc(n) option remember;local k: for k from 1 while isprime((nextprime@@k)(A002110(n)+1)-A002110(n)) do od: k; end;
-
PARI
a(n) = {my(k=0, P=prod(m=1, n, prime(m))); for(m=2, oo, if(ispseudoprime(P+m), k++; if(!isprime(m), return(k)))); } \\ Jinyuan Wang, Jun 13 2020
Extensions
More terms from Jinyuan Wang, Jun 13 2020
Comments