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 A046813 #10 Apr 04 2025 22:30:34 %S A046813 1,2,13,113,149,1127,1136,1247,1123,1349,1579,1237,11267,11338,11248, %T A046813 11237,11234,11389,11579,13358,11347,11239,12457,12679,12349,12347, %U A046813 13678,12359,14579,13489,111349,12367,12389,23579,13579,112468,12379 %N A046813 Smallest number m with nonzero digits such that A046810(m)=n. %H A046813 Robert Israel, <a href="/A046813/b046813.txt">Table of n, a(n) for n = 0..2124</a> %p A046813 N:= 100: # for a(0) .. a(N) %p A046813 f:= proc(L) local t, i; %p A046813 if convert(L,`+`) mod 3 = 0 then return 0 fi; %p A046813 add(`if`(isprime(add(t[i]*10^(i-1), i=1..nops(t))), 1, 0), t=combinat:-permute(L)) %p A046813 end proc: %p A046813 V:= Array(0..N): count:= 0: %p A046813 for d from 1 while count < N+1 do %p A046813 if d = 1 then S:= [seq([i],i=1..9)] %p A046813 else S:= map(proc(t) local i; seq([i, op(t)], i=t[1]..9) end proc, S) %p A046813 fi; %p A046813 for L in S while count < N+1 do %p A046813 v:= f(L); %p A046813 if v <= N and V[v] = 0 then V[v] := add(L[i]*10^(i-1),i=1..nops(L)); count:= count+1 fi; %p A046813 od od: %p A046813 convert(V,list); %K A046813 nonn,base %O A046813 0,2 %A A046813 _David W. Wilson_