OFFSET
1,12
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
MAPLE
rev:= 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 r, g;
r:= rev(n);
g:= igcd(n, r);
if g = 1 then r else n/g fi
end proc;
map(f, [$1..100]); # Robert Israel, Jul 09 2024
MATHEMATICA
a[n_] := Module[{r = IntegerReverse[n], g}, g = GCD[n, r]; If[g == 1, r, n/g]]; Array[a, 100] (* Amiram Eldar, Mar 31 2024 *)
CROSSREFS
KEYWORD
AUTHOR
Ctibor O. Zizka, Mar 31 2024
STATUS
approved