A361085 Least prime p > prime(n) such that at least one of p * prime(n)# +- 1 is not squarefree, where prime(n)# is the n-th primorial A002110(n).
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
Offset: 0
Examples
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.
Links
- Dan Asimov, Interesting sequence on MathOverflow, math-fun mailing list, Mar 28 2023.
- Fredrick M. Nelson, Does a(0)=6, a(n+1)=a(n)^3-a(n), define a square-free sequence?, MathOverflow, Mar 24 2023.
Crossrefs
Programs
-
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 *)
-
PARI
A361085(n, P=vecprod(primes(n)))=forprime(p=prime(n)+1,,(issquarefree(p*P-1)&&issquarefree(p*P+1))||return(p))
Extensions
a(30) from Michael S. Branicky, Mar 29 2023
a(31)-a(40) from Jinyuan Wang, Mar 30 2023
Comments