This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A056730 #14 Sep 12 2018 01:12:55 %S A056730 101,131,151,181,191,313,353,373,383,727,757,787,797,919,929,11311, %T A056730 11411,13331,15551,16661,18181,19991,32323,33533,35353,72227,72727, %U A056730 74747,75557,76667,77377,77477,77977,78787,78887,79997,94949,95959 %N A056730 Palindromic primes with just two distinct digits. %H A056730 Robert Israel, <a href="/A056730/b056730.txt">Table of n, a(n) for n = 1..10000</a> %p A056730 f:= proc(d) local d1,d2,L,cand,C1,C2,C3,a,b,n,Cands; %p A056730 Cands:= NULL; %p A056730 d1:= (d+1)/2; %p A056730 d2:= d-d1; %p A056730 for b in [1,3,7,9] do %p A056730 for a in {$0..9} minus {b} do %p A056730 for n from 2^(d1-1) to 2^d1-2 do %p A056730 L:= convert(n,base,2); %p A056730 C1:= a*(10^d-1)/9; %p A056730 C2:= (b-a)*add(L[i]*10^(i+d2-1),i=1..d1); %p A056730 C3:= (b-a)*add(L[i]*10^(d1-i),i=2..d1); %p A056730 cand:= C1+C2+C3; %p A056730 if isprime(cand) then Cands:= Cands, cand; fi %p A056730 od od od; %p A056730 sort([Cands]) %p A056730 end proc: %p A056730 map(op, [seq(f(d),d=3..7,2)]); # _Robert Israel_, Sep 09 2018 %t A056730 Select[ Range[ 1, 3 10^6, 2 ], PrimeQ[ # ] && Length[ Union[ RealDigits[ # ][ [ 1 ] ] ] ] == 2 && RealDigits[ # ][ [ 1 ] ] == Reverse[ RealDigits[ # ][ [ 1 ] ] ] & ] %Y A056730 Intersection of A002385 and A031955. %K A056730 nonn,base %O A056730 1,1 %A A056730 _Robert G. Wilson v_, Aug 11 2000