[go: up one dir, main page]

login
A318996
a(n) = Sum_{d|n} (sigma(n) mod d).
6
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,4
LINKS
Carlos Rivera, Puzzle 1065. A larger integer than 45 such that ..., The Prime Puzzles and Problems Connection.
FORMULA
a(A007691(n)) = 0.
a(A000040(n)) = 1.
a(A008578(n)) = tau(n) - 1.
a(n) = n for numbers 4, 45, 6048, 14421, ...
EXAMPLE
For n = 4; a(4) = (7 mod 1) + (7 mod 2) + (7 mod 4) = 0 + 1 + 3 = 4.
MATHEMATICA
a[n_] := Block[{s = DivisorSigma[1, n]}, DivisorSum[n, Mod[s, #] &]]; Array[a, 72] (* Giovanni Resta, Sep 07 2018 *)
PROG
(Magma) [&+[SumOfDivisors(n) mod d: d in Divisors(n)] : n in [1..1000]]
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Sep 07 2018
STATUS
approved