OFFSET
1,3
COMMENTS
The totatives of n are the numbers k <= n with gcd(k,n) = 1.
If p is prime, a(p) = (p+2)*(p+1)*p*(p-1)/24.
It appears that 12*a(n) is always a multiple of n.
Conjecture: if p and q are distinct primes, a(p*q) = (p^2-p)*(q^2-q)*(p^2*q^2-p^2*q-p*q^2+p*q+2*p+2*q)/24.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The totatives of 8 are 1, 3, 5, 7, so a(8) = 1*(1+3+5+7)+3*(1+3+5)+5*(1+3)+7*1 = 70.
MAPLE
f:= proc(n) local C, i, S, t;
C:= select(t -> igcd(t, n)=1, [$1..n]);
S:= ListTools:-PartialSums(C);
add(S[-i]*C[i], i=1..nops(C))
end proc:
map(f, [$1..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 04 2021
STATUS
approved