login
A362469
Sum of the numbers k, 1 <= k <= n, such that phi(k) | n.
0
1, 3, 3, 10, 3, 16, 3, 29, 3, 16, 3, 67, 3, 16, 3, 82, 3, 64, 3, 62, 3, 16, 3, 208, 3, 16, 3, 51, 3, 97, 3, 205, 3, 16, 3, 269, 3, 16, 3, 247, 3, 64, 3, 74, 3, 16, 3, 660, 3, 49, 3, 51, 3, 202, 3, 185, 3, 16, 3, 481, 3, 16, 3, 502, 3, 133, 3, 51, 3, 49, 3, 1034, 3, 16, 3, 51, 3
OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} k * (1 - ceiling(n/phi(k)) + floor(n/phi(k))).
EXAMPLE
a(4) = 10: for the numbers 1..4, phi(1)=1|4, phi(2)=1|4, phi(3)=2|4, and phi(4)=2|4. Their sum is then 1+2+3+4 = 10.
MATHEMATICA
a[n_] := Sum[If[Divisible[n, EulerPhi[k]], k, 0], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Apr 22 2023 *)
PROG
(PARI) a(n) = sum(k=1, n, if (!(n % eulerphi(k)), k)); \\ Michel Marcus, Apr 22 2023
CROSSREFS
Sequence in context: A072004 A095271 A054511 * A286570 A134704 A057210
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 21 2023
STATUS
approved