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.

A345222 Number of divisors of n with a prime number of divisors.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 2, 3, 1, 3, 1, 3, 2, 2, 2, 4, 1, 2, 2, 3, 1, 3, 1, 3, 3, 2, 1, 4, 2, 3, 2, 3, 1, 3, 2, 3, 2, 2, 1, 4, 1, 2, 3, 4, 2, 3, 1, 3, 2, 3, 1, 4, 1, 2, 3, 3, 2, 3, 1, 4, 3, 2, 1, 4, 2, 2, 2, 3, 1, 4, 2, 3, 2
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 11 2021

Keywords

Comments

Number of divisors of n that are powers of primes with an exponent k such that k+1 is a prime. - Amiram Eldar, Oct 06 2023
Inverse Möbius transform of sequence b(1) = 0, b(n) = A355937(n) for n > 1, or equivalently, one less than the inverse Möbius transform of A355937. - Antti Karttunen, Oct 06 2023

Examples

			a(12) = 3; The divisors of 12 are {1, 2, 3, 4, 6, 12} and the corresponding number of divisors of each of these numbers is {1, 2, 2, 3, 4, 6}. Thus, there are 3 divisors of 12 with a prime number of divisors.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(PrimePi[DivisorSigma[0, k]] - PrimePi[DivisorSigma[0, k] - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
    f[p_, e_] := PrimePi[e+1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a,100] (* Amiram Eldar, Oct 06 2023 *)
  • PARI
    a(n) = sumdiv(n, d, isprime(numdiv(d))); \\ Michel Marcus, Jun 11 2021

Formula

a(n) = Sum_{d|n} c(tau(d)), where c(n) is the prime characteristic.
From Amiram Eldar, Oct 06 2023: (Start)
Additive with a(p^e) = primepi(e+1).
Sum_{k=1..n} a(k) ~ n * (log(n) + B + C), where B is Mertens's constant (A077761), and C = Sum_{k>=2} P(prime(k)-1) = 0.54756961912815344341..., where P(s) is the prime zeta function. (End)