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.

A351711 a(n) = Sum_{p|n, p prime} Sum_{d|n} gcd(d,p).

Original entry on oeis.org

0, 3, 4, 5, 6, 14, 8, 7, 7, 18, 12, 22, 14, 22, 20, 9, 18, 23, 20, 28, 24, 30, 24, 30, 11, 34, 10, 34, 30, 52, 32, 11, 32, 42, 28, 36, 38, 46, 36, 38, 42, 60, 44, 46, 32, 54, 48, 38, 15, 31, 44, 52, 54, 32, 36, 46, 48, 66, 60, 80, 62, 70, 38, 13, 40, 76, 68, 64, 56, 68, 72, 49
Offset: 1

Views

Author

Wesley Ivan Hurt, Feb 16 2022

Keywords

Examples

			a(6) = 14; a(6) = Sum_{p|6, p prime} Sum_{d|6} gcd(d,p) = gcd(1,2) + gcd(2,2) + gcd(3,2) + gcd(6,2) + gcd(1,3) + gcd(2,3) + gcd(3,3) + gcd(6,3) = 1 + 2 + 1 + 2 + 1 + 1 + 3 + 3 = 14.
		

Crossrefs

Cf. A001221 (omega), A000005 (tau), A351758.

Programs

  • Maple
    f:= proc(n) local p, P; uses numtheory;
      P:= factorset(n);
      tau(n)*nops(P)+add((p-1)*tau(n/p),p=P);
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 05 2022
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, (f[k,1]-1)*numdiv(n/f[k,1])) + omega(f)*numdiv(f); \\ Michel Marcus, Feb 18 2022

Formula

a(p) = p + 1, p prime.
a(n) = tau(n)*omega(n) + Sum_{p|n, p prime} (p-1)*tau(n/p).