A318996 a(n) = Sum_{d|n} (sigma(n) mod d).
0, 1, 1, 4, 1, 0, 1, 11, 5, 11, 1, 9, 1, 13, 13, 26, 1, 10, 1, 8, 17, 17, 1, 16, 7, 19, 18, 0, 1, 28, 1, 57, 19, 23, 22, 34, 1, 25, 23, 24, 1, 41, 1, 65, 45, 29, 1, 57, 9, 68, 25, 75, 1, 39, 25, 25, 29, 35, 1, 88, 1, 37, 74, 120, 29, 37, 1, 91, 31, 24, 1, 103
Offset: 1
Keywords
Examples
For n = 4; a(4) = (7 mod 1) + (7 mod 2) + (7 mod 4) = 0 + 1 + 3 = 4.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- Carlos Rivera, Puzzle 1065. A larger integer than 45 such that ..., The Prime Puzzles and Problems Connection.
Programs
-
Magma
[&+[SumOfDivisors(n) mod d: d in Divisors(n)] : n in [1..1000]]
-
Mathematica
a[n_] := Block[{s = DivisorSigma[1, n]}, DivisorSum[n, Mod[s, #] &]]; Array[a, 72] (* Giovanni Resta, Sep 07 2018 *)
-
PARI
a(n) = my(sn = sigma(n)); sumdiv(n, d, sn % d); \\ Michel Marcus, Sep 07 2018
-
Python
from sympy import divisors def a(n): divs = divisors(n); s = sum(divs); return sum(s%d for d in divs) print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Nov 27 2021