login
A068990
Primes which remain prime after each digit is increased by 2.
1
3, 5, 19, 31, 37, 61, 67, 79, 127, 131, 137, 139, 151, 157, 167, 179, 197, 211, 227, 241, 257, 277, 347, 359, 397, 409, 419, 421, 431, 461, 479, 491, 509, 521, 547, 587, 601, 607, 617, 619, 631, 641, 661, 719, 739, 761, 769, 787, 809, 811, 827, 859, 881, 907
OFFSET
1,1
LINKS
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
Sequence in context: A277688 A215131 A355253 * A228471 A062594 A128027
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