OFFSET
1,1
MAPLE
with(numtheory): P:=proc(q) local a, d, i, k, n, p, t;
for n from 1 to q do t:=0; a:=convert(n, base, 10); for k from 1 to nops(a) do
d:=0; for i from 1 to nops(a) do if i<> k then d:=d*10+a[-i]; fi; od;
t:=d*add(op(2, p)/op(1, p), p=ifactors(d)[2])+t; od;
if n=t then print(n); fi; od; end: P(10^7);
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Paolo P. Lava, Jul 06 2024
STATUS
approved