This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A318996 #21 Sep 08 2022 08:46:23 %S A318996 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, %T A318996 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, %U A318996 25,25,29,35,1,88,1,37,74,120,29,37,1,91,31,24,1,103 %N A318996 a(n) = Sum_{d|n} (sigma(n) mod d). %H A318996 Antti Karttunen, <a href="/A318996/b318996.txt">Table of n, a(n) for n = 1..65537</a> %H A318996 Carlos Rivera, <a href="https://www.primepuzzles.net/puzzles/puzz_1065.htm">Puzzle 1065. A larger integer than 45 such that ...</a>, The Prime Puzzles and Problems Connection. %F A318996 a(A007691(n)) = 0. %F A318996 a(A000040(n)) = 1. %F A318996 a(A008578(n)) = tau(n) - 1. %F A318996 a(n) = n for numbers 4, 45, 6048, 14421, ... %e A318996 For n = 4; a(4) = (7 mod 1) + (7 mod 2) + (7 mod 4) = 0 + 1 + 3 = 4. %t A318996 a[n_] := Block[{s = DivisorSigma[1, n]}, DivisorSum[n, Mod[s, #] &]]; Array[a, 72] (* _Giovanni Resta_, Sep 07 2018 *) %o A318996 (Magma) [&+[SumOfDivisors(n) mod d: d in Divisors(n)] : n in [1..1000]] %o A318996 (PARI) a(n) = my(sn = sigma(n)); sumdiv(n, d, sn % d); \\ _Michel Marcus_, Sep 07 2018 %o A318996 (Python) %o A318996 from sympy import divisors %o A318996 def a(n): divs = divisors(n); s = sum(divs); return sum(s%d for d in divs) %o A318996 print([a(n) for n in range(1, 73)]) # _Michael S. Branicky_, Nov 27 2021 %Y A318996 Cf. A000005, A000040, A000203, A007691, A008578, A300657. %K A318996 nonn %O A318996 1,4 %A A318996 _Jaroslav Krizek_, Sep 07 2018