login
A340179
a(n) = Sum_{x in C(n)} (A023896(n) mod x), where C(n) is the set of numbers < n coprime to n, and A023896(n) is the sum of C(n).
7
0, 0, 1, 1, 3, 1, 6, 4, 15, 10, 25, 9, 33, 20, 25, 32, 49, 24, 56, 34, 68, 48, 98, 35, 152, 54, 100, 89, 180, 30, 178, 91, 146, 146, 150, 115, 314, 160, 220, 166, 315, 120, 306, 211, 267, 254, 412, 196, 485, 224, 383, 339, 600, 243, 609, 306, 481, 419, 801, 215, 859, 490, 577, 567, 782, 297, 865
OFFSET
1,5
LINKS
EXAMPLE
For n=8, C = {1,3,5,7}, c = 1+3+5+7 = 16, and a(n) = (16 mod 1) + (16 mod 3) + (16 mod 5) + (16 mod 7) = 0+1+1+2 = 4.
MAPLE
f:= proc(n) local C, s, c;
C:=select(t -> igcd(t, n) = 1, [$1..n-1]);
s:= convert(C, `+`);
add(s mod c, c = C)
end proc:
map(f, [$1..100]);
MATHEMATICA
Table[Total@ Mod[#2, #1] & @@ {#, Total@ #} &@ Select[Range[n], GCD[#, n] == 1 &], {n, 67}] (* Michael De Vlieger, Dec 31 2020 *)
PROG
(PARI) apply( {A340179(n, s=n*eulerphi(n)\/2)=sum(k=2, n-1, if(gcd(n, k)<2, s%k))}, [1..66]) \\ M. F. Hasler, Feb 01 2021
CROSSREFS
Sequence in context: A210841 A007383 A206434 * A120394 A371667 A016575
KEYWORD
nonn,look
AUTHOR
J. M. Bergot and Robert Israel, Dec 30 2020
STATUS
approved