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.

A345301 a(n) = Sum_{p|n, p prime} p^pi(n/p).

Original entry on oeis.org

0, 1, 1, 2, 1, 7, 1, 4, 9, 13, 1, 17, 1, 23, 52, 16, 1, 43, 1, 41, 130, 43, 1, 113, 125, 77, 81, 113, 1, 270, 1, 64, 364, 145, 968, 371, 1, 275, 898, 881, 1, 1328, 1, 377, 1354, 535, 1, 1241, 2401, 1137, 2476, 681, 1, 2699, 4456, 2913, 6922, 1053, 1, 10710, 1, 2079, 8962
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 13 2021

Keywords

Examples

			a(12) = Sum_{p|12} p^pi(12/p) = 2^pi(6) + 3^pi(4) = 2^3 + 3^2 = 17.
		

Crossrefs

Cf. A000720.

Programs

  • Mathematica
    Table[Sum[k^PrimePi[n/k] (PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 80}]
  • PARI
    A345301(n) = if(1==n, 0, my(f=factor(n)); sum(i=1, #f~, f[i, 1]^primepi(n/f[i, 1]))); \\ Antti Karttunen, Jan 22 2025
  • Python
    from sympy import primefactors, primepi
    def A345301(n): return sum(p**primepi(n//p) for p in primefactors(n)) # Chai Wah Wu, Jun 13 2021
    

Formula

a(p^k) = p^pi(p^(k-1)), for p prime and k >= 1. - Wesley Ivan Hurt, Jun 26 2024