OFFSET
1,2
COMMENTS
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{d|n} A001783(d).
EXAMPLE
For n=6; sets of totatives of divisors of 6: {1}, {1}, {1, 2}, {1, 5}; a(6) = 1+1+(1*2)+(1*5) = 9.
MATHEMATICA
Table[Sum[Times @@ Select[Range@ d, CoprimeQ[#, d] &], {d, Divisors@ n}], {n, 27}] (* Michael De Vlieger, Jan 01 2017 *)
PROG
(Magma) [&+[&*[h: h in [1..d] | GCD(h, d) eq 1]: d in Divisors(n)]: n in [1..100]]
(PARI) a(n) = sumdiv(n, d, prod(k=1, d, if (gcd(k, d)==1, k, 1))); \\ Michel Marcus, Jan 02 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Jan 01 2017
STATUS
approved