login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 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
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.
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*P-1)&&issquarefree(p*P+1))||return(p))
CROSSREFS
Cf. A002110 (factorials), A013929 (numbers that are not squarefree), A007018, A228649 (both related).
Sequence in context: A016552 A321069 A355273 * A141578 A327748 A272345
KEYWORD
nonn,hard,more
AUTHOR
M. F. Hasler, Mar 28 2023
EXTENSIONS
a(30) from Michael S. Branicky, Mar 29 2023
a(31)-a(40) from Jinyuan Wang, Mar 30 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 18:06 EDT 2024. Contains 372277 sequences. (Running on oeis4.)