Robert Israel, <a href="/A178555/b178555_1.txt">Table of n, a(n) for n = 1..10000</a>
Robert Israel, <a href="/A178555/b178555_1.txt">Table of n, a(n) for n = 1..10000</a>
proposed
approved
editing
proposed
nonn,base,look,changed
proposed
editing
editing
proposed
editing
proposed
Robert Israel, <a href="/A178555/b178555_1.txt">Table of n, a(n) for n = 1..10000</a>
if L[-1] = 0 then next fi;
proposed
editing
editing
proposed
Robert Israel, <a href="/A178555/b178555.txt">Table of n, a(n) for n = 1..10000</a>
f:= proc(m) local R, L, s, k, t, x;
R:= NULL;
for k from 9^(m-6) to 2*9^(m-6)-1 do
t:= Vector(subs([8=9, 7=8, 6=7], convert(k, base, 9)[1..m-6]));
for s in combinat:-choose([$2..m], m-7) do
L:= Vector(m, 6);
L[[1, op(s)]]:= t;
x:= add(L[i]*10^(i-1), i=1..m);
if isprime(x) then R:= R, x fi;
od od:
op(sort([R]));
end proc:
f(8); # Robert Israel, May 08 2018
approved
editing