A382834 Smallest number k > P(n) - prime(n+1)^2 which is coprime to P(n), where P(n)= A002110(n) are the primorials.
-5, -17, -17, 97, 2143, 29747, 510151, 9699167, 223092031, 6469692277, 200560488763, 7420738133141, 304250263525363, 13082761331667823, 614889782588488607, 32589158477190041261, 1922760350154212635351, 117288381359406970978787, 7858321551080267055874051
Offset: 1
Examples
a(4) = 97, since 2*3*5*7 - 11^2 = 89, the smallest number coprime to 2*3*5*7 greater than 89 is 97. a(2) = -17, since 2*3 - 5^2 = -19, the smallest number x>-19 coprime here is thus -17, and its difference d = 30 -(-17) = 47 is the largest prime < 7^2.
Links
- Jakub Buczak and Antony Theodorakopoulos, How primorials can be used to generate primes.
Programs
-
PARI
a(n) = my(P=vecprod(primes(n)), k=P-prime(n+1)^2+1); while (gcd(k,P)!=1, k++); k; \\ Michel Marcus, Apr 07 2025
Comments