OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
Increasing each digit of the prime 139 by 2 gives 3511, which is also prime; so 139 is a term of the sequence.
MAPLE
filter:= proc(n) local L, i;
if not isprime(n) then return false fi;
L:= map(t -> `if`(t>=8, op([t-8, 1]), t+2), convert(n, base, 10));
isprime(add(L[i]*10^(i-1), i=1..nops(L)))
end proc:
select(filter, [seq(i, i=3..1000, 2)]); # Robert Israel, Mar 21 2017
MATHEMATICA
Do[ If[ PrimeQ[ ToExpression[ StringJoin[ ToString /@ (IntegerDigits[Prime[n]] + 2)]]], Print[ Prime[n]]], {n, 1, 500}]
Select[Prime[Range[200]], PrimeQ[FromDigits[Flatten[IntegerDigits/@ (IntegerDigits[ #]+ 2)]]]&] (* Harvey P. Dale, Apr 27 2018 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Joseph L. Pe, Mar 12 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Apr 08 2002
STATUS
approved