OFFSET
1,4
COMMENTS
a(p) = 1 for p = primes.
a(n) = n for numbers: 4, 10, 294, 8388, 612018, 1037952, 3357600, ...
n divides a(n) for numbers: 1, 4, 10, 294, 8388, 218088, 612018, 883386, 1037952, 3357600, ... Corresponding quotients: 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, ...
From Robert Israel, Mar 11 2018: (Start)
a(p*q) = 3+p+q if p < q are distinct primes and q>3.
a(p^k) = (p^(k+1)-(1+k)*p + k)/(p-1)^2 if p is prime and k >= 0. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} A054024(d).
EXAMPLE
For n = 4; a(n) = (sigma(1) mod 1 + sigma(2) mod 2 + sigma(4) mod 4) = (0 + 1 + 3) = 4.
MAPLE
A300657 := n -> add(numtheory:-sigma(d) mod d, d = numtheory:-divisors(n)):
map(A300657, [$1..100]); # Robert Israel, Mar 11 2018
MATHEMATICA
Array[DivisorSum[#, Mod[DivisorSigma[1, #], #] &] &, 72] (* or *)
Fold[Function[{a, n}, Append[a, {Total@ Map[a[[#, -1]] &, Most@ Divisors@ n] + #, #} &@ Mod[DivisorSigma[1, n], n]]], {{0, 0}}, Range[2, 72]][[All, 1]] (* Michael De Vlieger, Mar 10 2018 *)
PROG
(Magma) [(&+[SumOfDivisors(d) mod d: d in Divisors(n)]): n in [1..100]]
(PARI) a(n) = sumdiv(n, d, sigma(d) % d); \\ Michel Marcus, Mar 11 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Mar 10 2018
STATUS
approved