login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225659
Primes p where p + sumOfDigits(p) +- 3 is prime.
1
2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 131, 137, 139, 157, 173, 179, 191, 197, 223, 227, 229, 241, 263, 269, 283, 311, 313, 317, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 463, 467, 487, 557
OFFSET
1,1
COMMENTS
a(n) = A068690(n), A030144(n), A069556(n), A091727(n), A156756(n) if n<14.
LINKS
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
KEYWORD
nonn,easy,base,dumb
AUTHOR
John-Å. W. Olsen, May 11 2013
STATUS
approved