OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(d) local d1, d2, L, cand, C1, C2, C3, a, b, n, Cands;
Cands:= NULL;
d1:= (d+1)/2;
d2:= d-d1;
for b in [1, 3, 7, 9] do
for a in {$0..9} minus {b} do
for n from 2^(d1-1) to 2^d1-2 do
L:= convert(n, base, 2);
C1:= a*(10^d-1)/9;
C2:= (b-a)*add(L[i]*10^(i+d2-1), i=1..d1);
C3:= (b-a)*add(L[i]*10^(d1-i), i=2..d1);
cand:= C1+C2+C3;
if isprime(cand) then Cands:= Cands, cand; fi
od od od;
sort([Cands])
end proc:
map(op, [seq(f(d), d=3..7, 2)]); # Robert Israel, Sep 09 2018
MATHEMATICA
Select[ Range[ 1, 3 10^6, 2 ], PrimeQ[ # ] && Length[ Union[ RealDigits[ # ][ [ 1 ] ] ] ] == 2 && RealDigits[ # ][ [ 1 ] ] == Reverse[ RealDigits[ # ][ [ 1 ] ] ] & ]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Aug 11 2000
STATUS
approved