OFFSET
1,1
COMMENTS
MAPLE
istwp := proc(n)
if isprime(n) then
if isprime(n+2) or isprime(n-2) then
true;
else
false;
end if;
else
false;
end if;
end proc:
for i from 4 do
p := ithprime(i) ;
p1 := prevprime(p) ;
if istwp(p1) then
p2 := prevprime(p1) ;
if istwp(p2) then
p3 := prevprime(p2) ;
if istwp(p3) then
p1 := nextprime(p) ;
if istwp(p1) then
p2 := nextprime(p1) ;
if istwp(p2) then
p3 := nextprime(p2) ;
if istwp(p3) then
printf("%d\n", p) ;
end if;
end if;
end if;
end if;
end if;
end if;
end do: # R. J. Mathar, Jul 13 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Irina Gerasimova, Jul 06 2013
EXTENSIONS
Corrected by R. J. Mathar, Jul 13 2013
STATUS
approved