login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A153213
Primes p such that both p-2 and p+2 are not squarefree.
9
2, 47, 173, 277, 727, 839, 929, 1181, 1423, 1447, 1523, 1627, 1811, 1847, 1861, 1973, 2207, 2297, 2423, 2693, 3323, 3701, 3719, 3877, 4327, 4363, 4457, 4673, 4691, 4903, 5227, 5573, 5821, 5927, 6173, 6221, 6323, 6473, 6577, 6653, 7027, 7103, 7477, 7823
OFFSET
1,1
MATHEMATICA
lst={}; Do[p=Prime[n]; If[ !SquareFreeQ[p-2]&&!SquareFreeQ[p+2], AppendTo[lst, p]], {n, 7!}]; lst
PROG
(PARI) is(n)=isprime(n) && !issquarefree(n-2) && !issquarefree(n+2) \\ Charles R Greathouse IV, Nov 05 2017
KEYWORD
nonn
AUTHOR
STATUS
approved