login
A340180
a(n) = Sum_{x in C(n)} (sigma(n) mod x), where C(n) is the set of numbers < n coprime to n, and sigma = A000203.
6
0, 0, 0, 1, 2, 2, 7, 1, 16, 4, 16, 9, 30, 23, 26, 24, 46, 19, 60, 30, 60, 52, 84, 43, 132, 77, 105, 62, 137, 51, 166, 88, 183, 139, 182, 117, 247, 186, 239, 158, 283, 99, 327, 194, 259, 284, 373, 176, 462, 234, 442, 294, 491, 235, 508, 294, 514, 430, 585, 259, 671, 519, 546, 408, 749, 323, 798
OFFSET
1,5
LINKS
EXAMPLE
For n=8, sigma(8) = 15 and C(8) = {1,3,5,7} so a(8) = (15 mod 1) + (15 mod 3) + (15 mod 5) + (15 mod 7) = 1.
MAPLE
f := proc(n) local C, s, c;
s:= numtheory:-sigma(n);
C:=select(t -> igcd(t, n) = 1, [$1..n-1]);
add(s mod c, c=C)
end proc:
map(f, [$1..100]);
MATHEMATICA
Table[Sum[Mod[DivisorSigma[1, n], k] Floor[1/GCD[k, n]], {k, n - 1}], {n, 80}] (* Wesley Ivan Hurt, Jan 30 2021 *)
PROG
(PARI) a(n) = my(s=sigma(n)); sum(k=1, n, if (gcd(k, n)==1, s % k)); \\ Michel Marcus, Jan 31 2021
CROSSREFS
Cf. A000203, A340179, A337189 (n | a(n)).
Sequence in context: A019807 A362029 A324085 * A063706 A110779 A121708
KEYWORD
nonn,look
AUTHOR
J. M. Bergot and Robert Israel, Dec 30 2020
STATUS
approved