OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
EXAMPLE
647 is in the sequence since 647+(floor(sqrt(6))+floor(sqrt(4))+floor(sqrt(7))) = 647+(2+2+2) = 647+6 = 653 is prime AND 647-6 = 641 is prime.
MAPLE
filter:= proc(p) local L, t, d;
if not isprime(p) then return false fi;
L:= convert(p, base, 10);
d:= add(floor(sqrt(t)), t=L);
isprime(p-d) and isprime(p+d)
end proc:
select(filter, [seq(i, i=3..20000, 2)]); # Robert Israel, Apr 14 2020
MATHEMATICA
Select[Prime[Range[2500]], With[{d = Total[Floor[Sqrt[IntegerDigits[#]]]]}, AllTrue[# + {d, -d}, PrimeQ]] &] (* Paolo Xausa, Jan 13 2026 *)
PROG
(PARI) isok(p) = isprime(p) && (d=digits(p)) && (sd = sum(i=1, #d, sqrtint(d[i]))) && isprime(p+sd) && isprime(p-sd); \\ Michel Marcus, Jan 19 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Jul 21 2010
EXTENSIONS
Definition clarified by Robert Israel, Apr 14 2020
STATUS
approved
