OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
15 = 3*5 is the smallest squarefree composite number m such that m+2 is prime; 15+2=17.
MAPLE
with(NumberTheory):
N := 500;
for n from 2 to N do
if IsSquareFree(n) and not mod(n, 2) = 0 and not isprime(n) and isprime(n+2) then print(n);
end if:
end do:
MATHEMATICA
Select[Range[15, 611, 2], And[CompositeQ@ #, SquareFreeQ@ #, PrimeQ[# + 2]] &] (* Michael De Vlieger, Jul 08 2019 *)
Select[Prime[Range[2, 150]]-2, SquareFreeQ[#]&&CompositeQ[#]&] (* Harvey P. Dale, Dec 03 2022 *)
PROG
(PARI) isok(n) = isprime(n+2) && (n%2) && (n>1) && !isprime(n) && issquarefree(n); \\ Michel Marcus, Jul 05 2019
(Magma) [n: n in [2..611] | IsPrime(n+2) and not IsPrime(n) and IsSquarefree(n)]; // Vincenzo Librandi, Jul 07 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 05 2019
STATUS
approved