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 A057880 #15 Mar 31 2023 13:42:21 %S A057880 6173,12239,16673,19531,19973,21613,22397,22937,34613,36137,47933, %T A057880 51193,54493,56519,56531,56591,69491,69497,72937,76873,93497,96419, %U A057880 96479,96497,98837,112939,118213,131779,143419,144497,159319,163337 %N A057880 Primes with 4 distinct digits that remain prime (no leading zeros allowed) after deleting all occurrences of its digits d. %H A057880 Robert Israel, <a href="/A057880/b057880.txt">Table of n, a(n) for n = 1..653</a> %p A057880 filter:= proc(L) local d,Lp,i; %p A057880 if L[-1]=0 then return false fi; %p A057880 if not isprime(add(L[i]*10^(i-1),i=1..nops(L))) then return false fi; %p A057880 for d in convert(L,set) do %p A057880 Lp:= remove(`=`,L,d); %p A057880 if Lp[-1] = 0 or not isprime(add(Lp[i]*10^(i-1),i=1..nops(Lp))) then return false fi; %p A057880 od; %p A057880 true %p A057880 end proc: %p A057880 getCands:= proc(n, m) option remember; %p A057880 if m = 1 then return [seq([d$n], d=0..9)] fi; %p A057880 if n < m then return [] fi; %p A057880 [seq(seq([i,op(L)],i= {$0..9} minus convert(L,set)),L = procname(n-1,m-1)), %p A057880 seq(seq([i,op(L)],i=convert(L,set)),L = procname(n-1,m))] %p A057880 end proc: %p A057880 [seq(op(sort(map(t->add(t[i]*10^(i-1),i=1..nops(t)),select(filter,getCands(d,4))))),d=4..6)]; # _Robert Israel_, Jan 19 2017 %t A057880 p4dQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,0]==0 && Count[ DigitCount[ n],0]==6&&AllTrue[FromDigits/@Table[DeleteCases[idn,k],{k,Union[idn]}],PrimeQ]]; Select[Prime[Range[ 15000]],p4dQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 30 2017 *) %Y A057880 Cf. A057876-A057883, A051362, A034302-A034305. %K A057880 nonn,base %O A057880 1,1 %A A057880 _Patrick De Geest_, Oct 15 2000 %E A057880 Offset changed by _Robert Israel_, Jan 19 2017