cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049282 Primes p such that both p-2 and p+2 are squarefree.

This page as a plain text file.
%I A049282 #23 Apr 18 2025 17:34:10
%S A049282 3,5,13,17,19,31,37,41,53,59,67,71,89,103,107,109,113,131,139,157,163,
%T A049282 179,181,193,197,199,211,229,233,239,251,257,269,271,283,293,307,311,
%U A049282 337,347,379,383,397,401,409,419,431,433,449,463,467,487,491,499,503
%N A049282 Primes p such that both p-2 and p+2 are squarefree.
%H A049282 John Cerkan, <a href="/A049282/b049282.txt">Table of n, a(n) for n = 1..10000</a>
%F A049282 Intersection of A049231 and A049233.
%e A049282 37 is here because neither 37+2 nor 37-2 is divisible by squares.
%p A049282 with(numtheory): A049282:=n->`if`(isprime(n) and issqrfree(n-2) and issqrfree(n+2), n, NULL): seq(A049282(n), n=1..10^3); # _Wesley Ivan Hurt_, Jun 25 2016
%t A049282 lst={}; Do[p=Prime[n]; If[SquareFreeQ[p-2]&&SquareFreeQ[p+2], AppendTo[lst,p]], {n,6!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 20 2008 *)
%t A049282 Select[Prime[Range[100]],AllTrue[#+{2,-2},SquareFreeQ]&] (* _Harvey P. Dale_, Apr 18 2025 *)
%o A049282 (PARI) lista(nn) = forprime(p=2, nn, if (issquarefree(p-2) && issquarefree(p+2), print1(p, ", "))); \\ _Michel Marcus_, Jun 22 2016
%Y A049282 Cf. A049231, A049233.
%K A049282 nonn
%O A049282 1,1
%A A049282 _Labos Elemer_