

A361085


Least prime p > prime(n) such that at least one of p * prime(n)# + 1 is not squarefree, where prime(n)# is the nth primorial A002110(n).


2



3, 5, 29, 31, 139, 167, 43, 127, 211, 41, 607, 1223, 71, 769, 1549, 947, 269, 1129, 163, 577, 673, 107, 4057, 1979, 433, 3833, 4177, 383, 1723, 409, 2399, 4517, 3803, 3061, 3299, 457, 3779, 971, 5749, 2843, 13709
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

It appears that a product P of distinct primes rarely has the property that P + 1 has a square factor, and this is even more rare when P has all of the first n primes as factor. This sequence is one possible way to quantify this observation. (One could also display the gap between a(n) and prime(n), or consider b(n) the least product of distinct primes > prime(n) that yields a product with the desired property.)
See also Zumkeller's contested comment in A007018 and the discussion in the linked MathOverflow page.


LINKS



EXAMPLE

a(0) = 3 because for P = (product of the first 0 primes) = 1, p = 3 is the least prime such that p*P + 1 = 4 = 2^2 is a square; for p = 2 neither p*P  1 = 1 nor p*P + 1 = 3 has a nontrivial square factor.
a(1) = 5 because for P = (product of the first prime) = 2, p = 5 is the least prime such that p*P  1 = 9 = 3^2 is a square; for p = 3 none of p*P  1 = 5 nor p*P + 1 = 7 has a nontrivial square factor.
a(2) = 29 because for P = (product of the first two primes) = 6, p = 29 is the least prime such that p*P + 1 = 5^2*7 has a square factor; for all primes 3 < p < 29 both of p*P + 1 are squarefree.


MATHEMATICA

Map[(k = 1; While[AllTrue[Prime[k] # + {1, 1}, SquareFreeQ], k++]; Prime[k]) &, FoldList[Times, 1, Prime@ Range[24] ] ] (* Michael De Vlieger, Mar 28 2023 *)


PROG

(PARI) A361085(n, P=vecprod(primes(n)))=forprime(p=prime(n)+1, , (issquarefree(p*P1)&&issquarefree(p*P+1))return(p))


CROSSREFS



KEYWORD

nonn,hard,more


AUTHOR



EXTENSIONS



STATUS

approved



