OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..9999
FORMULA
EXAMPLE
a(45) = 5 as 10's complement of 45 is 100-45 = 55 and (45,55) = 5.
MAPLE
a:=n-> igcd((10^length(n)-n), n):
seq(a(n), n=1..100); # Alois P. Heinz, Sep 22 2015
MATHEMATICA
GCD[#, 10^(IntegerLength[#]) - #] & /@ Range[82] (* Jayanta Basu, Aug 07 2013 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Mar 08 2002
STATUS
approved