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.

A345315 a(n) = Sum_{d|n} d^[Omega(d) = 2], where [ ] is the Iverson bracket.

Original entry on oeis.org

1, 2, 2, 6, 2, 9, 2, 7, 11, 13, 2, 14, 2, 17, 18, 8, 2, 19, 2, 18, 24, 25, 2, 16, 27, 29, 12, 22, 2, 36, 2, 9, 36, 37, 38, 25, 2, 41, 42, 20, 2, 46, 2, 30, 28, 49, 2, 18, 51, 39, 54, 34, 2, 21, 58, 24, 60, 61, 2, 43, 2, 65, 34, 10, 68, 66, 2, 42, 72, 64, 2, 28, 2, 77, 44, 46, 80
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 13 2021

Keywords

Comments

For each divisor d of n, add d if d is semiprime, otherwise add 1. For example, the divisors of 24 are: 1, 2, 3, 4, 6, 8, 12, 24, and the only semiprime divisors of 24 are 4 and 6, so a(24) = 1 + 1 + 1 + 4 + 6 + 1 + 1 + 1 = 16.
Inverse Möbius transform of 1 + (n - 1)*c(n), where c = A064911. - Wesley Ivan Hurt, Jul 22 2025

Examples

			a(12) = Sum_{d|12} d^[Omega(d) = 2] = 1^0 + 2^0 + 3^0 + 4^1 + 6^1 + 12^0 = 14.
		

Crossrefs

Cf. A000005 (tau), A001222 (Omega), A001358 (semiprimes), A064911, A076290, A086971.

Programs

  • Mathematica
    Table[Sum[k^KroneckerDelta[PrimeOmega[k], 2] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = sumdiv(n, d, if (bigomega(d)==2, d, 1)); \\ Michel Marcus, Jun 13 2021

Formula

From Wesley Ivan Hurt, Jul 22 2025: (Start)
a(p^k) = k + p^2 for p prime and k >= 2, else k + 1 if k = 0 or 1.
a(n) = tau(n) + Sum_{d|n} (d - 1) * c(d), where c = A064911.
a(n) = A076290(n) + A000005(n) - A086971(n). (End)