OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..2200
MAPLE
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
f:= proc(n) local L, p, i, r;
L:= sort(map(t -> t[1]$t[2], ifactors(n)[2]));
r:= L[1];
for i from 2 to nops(L) do r:= r*10^(1+max(0, ilog10(L[i])))+L[i] od;
r
end proc:
f(1):= 1:
select(n -> (f(n) - revdigs(n)) mod n = 0, [$1..20000]);
PROG
(Python)
from sympy import factorint
def A103168(n):
return int(str(n)[::-1])%n
def A340592(n):
if n == 1: return 0
return int("".join(str(f) for f in factorint(n, multiple=True)))%n
def ok(n):
print([k for k in range(1, 20000) if ok(k)]) # Michael S. Branicky, Jan 18 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jan 17 2022
STATUS
approved