Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #18 Jan 27 2025 18:39:26
%S 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,
%T 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,
%U 202,3,185,3,16,3,481,3,16,3,502,3,133,3,51,3,49,3,1034,3,16,3,51,3
%N Sum of the numbers k, 1 <= k <= n, such that phi(k) | n.
%H Antti Karttunen, <a href="/A362469/b362469.txt">Table of n, a(n) for n = 1..20000</a>
%F a(n) = Sum_{k=1..n} k * (1 - ceiling(n/phi(k)) + floor(n/phi(k))).
%e 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.
%t a[n_] := Sum[If[Divisible[n, EulerPhi[k]], k, 0], {k, 1, n}]; Array[a, 100] (* _Amiram Eldar_, Apr 22 2023 *)
%o (PARI) a(n) = sum(k=1, n, if (!(n % eulerphi(k)), k)); \\ _Michel Marcus_, Apr 22 2023
%Y Cf. A000010, A069932.
%Y Row sums of A378636.
%K nonn,easy,changed
%O 1,2
%A _Wesley Ivan Hurt_, Apr 21 2023