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.

A349215 a(n) = Sum_{d|n} d^c(d), where c is the prime characteristic (A010051).

Original entry on oeis.org

1, 3, 4, 4, 6, 7, 8, 5, 5, 9, 12, 9, 14, 11, 10, 6, 18, 9, 20, 11, 12, 15, 24, 11, 7, 17, 6, 13, 30, 15, 32, 7, 16, 21, 14, 12, 38, 23, 18, 13, 42, 17, 44, 17, 12, 27, 48, 13, 9, 11, 22, 19, 54, 11, 18, 15, 24, 33, 60, 19, 62, 35, 14, 8, 20, 21, 68, 23, 28, 19, 72, 15, 74, 41, 12
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 10 2021

Keywords

Comments

For each divisor d of n, add d if d is prime, otherwise add 1. For example, a(6) = 1 + 2 + 3 + 1 = 7.

Crossrefs

Inverse Moebius transform of A089026.
Cf. A010051, A000005 (tau), A008472 (sopf), A001221 (omega).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, #^Boole[PrimeQ[#]] &]; Array[a, 75] (* Amiram Eldar, Nov 11 2021 *)
  • PARI
    a(n) = sumdiv(n, d, if (isprime(d), d, 1)); \\ Michel Marcus, Nov 11 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A349215(n):
        fs = factorint(n)
        return sum(a-1 for a in fs.keys())+prod(1+d for d in fs.values()) # Chai Wah Wu, Nov 11 2021

Formula

a(n) = A000005(n)+A008472(n)-A001221(n). - Chai Wah Wu, Nov 11 2021
a(p) = p+1 for primes p. - Wesley Ivan Hurt, Nov 28 2021