cp's OEIS Frontend

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.

A340180 a(n) = Sum_{x in C(n)} (sigma(n) mod x), where C(n) is the set of numbers < n coprime to n, and sigma = A000203.

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 7, 1, 16, 4, 16, 9, 30, 23, 26, 24, 46, 19, 60, 30, 60, 52, 84, 43, 132, 77, 105, 62, 137, 51, 166, 88, 183, 139, 182, 117, 247, 186, 239, 158, 283, 99, 327, 194, 259, 284, 373, 176, 462, 234, 442, 294, 491, 235, 508, 294, 514, 430, 585, 259, 671, 519, 546, 408, 749, 323, 798
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 30 2020

Keywords

Examples

			For n=8, sigma(8) = 15 and C(8) = {1,3,5,7} so a(8) = (15 mod 1) + (15 mod 3) + (15 mod 5) + (15 mod 7) = 1.
		

Crossrefs

Cf. A000203, A340179, A337189 (n | a(n)).

Programs

  • Maple
    f := proc(n) local C,s,c;
      s:= numtheory:-sigma(n);
      C:=select(t -> igcd(t,n) = 1, [$1..n-1]);
      add(s mod c, c=C)
    end proc:
    map(f, [$1..100]);
  • Mathematica
    Table[Sum[Mod[DivisorSigma[1, n], k] Floor[1/GCD[k, n]], {k, n - 1}], {n, 80}] (* Wesley Ivan Hurt, Jan 30 2021 *)
  • PARI
    a(n) = my(s=sigma(n)); sum(k=1, n, if (gcd(k, n)==1, s % k)); \\ Michel Marcus, Jan 31 2021