OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..394
EXAMPLE
If p = 409, then 409 + sod(409) +- 3 = 409+13 - 3 = 419, which is prime.
If p = 23, then 23 + sod(23) +- 3 = 23+5 + 3 = 31, which is prime.
MATHEMATICA
Select[Prime[Range[102]], Or@@PrimeQ[#+Total[IntegerDigits[#]]+{3, -3}] &] (* Jayanta Basu, May 23 2013 *)
PROG
(PARI)
ok(p)= {my(s=vecsum(digits(p))); isprime(p) && (isprime(p+s-3) || isprime(p+s+3))}
select(ok, [1..1000]) \\ Andrew Howroyd, Feb 22 2018
CROSSREFS
KEYWORD
nonn,easy,base,dumb
AUTHOR
John-Å. W. Olsen, May 11 2013
STATUS
approved