A075430 Primes with a squarefree neighbor.
2, 3, 5, 7, 11, 13, 23, 29, 31, 37, 41, 43, 47, 59, 61, 67, 71, 73, 79, 83, 101, 103, 107, 109, 113, 131, 137, 139, 157, 167, 173, 179, 181, 191, 193, 211, 223, 227, 229, 239, 257, 263, 277, 281, 283, 311, 313, 317, 331, 347, 353, 359, 367, 373, 383, 389, 397
Offset: 1
Keywords
Examples
a(3) = 5 because 6 (the number above) is squarefree. a(13) = 47 because 46 (the number below) is squarefree. 53 is not in the sequence because both 52 and 54 have squares among their divisors.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Enrique Pérez Herrero)
Programs
-
Mathematica
Select[Prime[Range[100]], Or @@ SquareFreeQ /@ (# + {-1, 1}) &] (* Amiram Eldar, May 07 2025 *)
-
PARI
isok(p) = isprime(p) && (issquarefree(p-1) || issquarefree(p+1)); \\ Michel Marcus, Feb 20 2023
-
Sage
def is_A075430(n): return is_prime(n) and (is_squarefree(n-1) or is_squarefree(n+1)) # D. S. McNeil, Jan 16 2011