OFFSET
1,10
COMMENTS
a(n)=n for n in A226778. - Robert Israel, Oct 09 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(12) = 4 since 12 / gcd(12,21) = 4. a(101) = 101 / gcd(101,101) = 1.
MAPLE
rev:= proc(n) local L, k;
L:= convert(n, base, 10);
add(L[-k]*10^(k-1), k=1..nops(L))
end proc:
f:= n -> n/igcd(n, rev(n)):
map(f, [$1..100]); # Robert Israel, Oct 09 2020
MATHEMATICA
Table[n/GCD[n, IntegerReverse[n]], {n, 1, 100}] (* Amiram Eldar, Oct 05 2020 *)
PROG
(PARI) a(n) = n/gcd(n, fromdigits(Vecrev(digits(n)))); \\ Michel Marcus, Oct 06 2020
CROSSREFS
KEYWORD
AUTHOR
Ctibor O. Zizka, Oct 05 2020
STATUS
approved