login
A240696
Prime numbers n such that replacing each digit d in the decimal expansion of n with its 9's complement produces a prime.
0
2, 7, 97, 997, 99999999999999997
OFFSET
1,1
COMMENTS
a(n) = {2} union {primes of the form 10^n - 3} = {2} union {A093172}.
Primes p such that A061601(p) is also prime.
The next term has 140 digits.
EXAMPLE
997 is in the sequence because 997 becomes (002) = 2, which is prime.
MATHEMATICA
lst={}; f[n_]:=Block[{a=IntegerDigits[Prime[n]], b="", k=1, l}, l=Length[a]; While[k<l+1, b=StringJoin[b, ToString[9-a[[k]]]]; k++]; ToExpression[b]]; Do[If[PrimeQ[f[n]], AppendTo[lst, Prime[n]]], {n, 1, 10^6}]; lst
CROSSREFS
Sequence in context: A112290 A072059 A308961 * A102344 A087589 A002812
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Apr 10 2014
STATUS
approved