OFFSET
1,2
COMMENTS
A balanced number k is a number such that phi(k) | sigma(k).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{k<=n, phi(k)|sigma(k)} k.
a(n) = Sum_{k=1..n} k * c(k), where c is the characteristic function of balanced numbers (A351114).
EXAMPLE
a(15) = 53; the sum of the balanced numbers <= 15 is 1+2+3+6+12+14+15 = 53.
MATHEMATICA
f[n_] := n * Boole[Divisible[DivisorSigma[1, n], EulerPhi[n]]]; Accumulate @ Array[f, 100] (* Amiram Eldar, Feb 01 2022 *)
Accumulate[Table[If[Divisible[DivisorSigma[1, n], EulerPhi[n]], n, 0], {n, 70}]] (* Harvey P. Dale, May 09 2022 *)
PROG
(PARI) a(n) = sum(k=1, n, if (!(sigma(k) % eulerphi(k)), k)); \\ Michel Marcus, Feb 01 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jan 31 2022
STATUS
approved