%I #22 Oct 06 2023 10:54:00
%S 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,
%T 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,
%U 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
%N Number of divisors of n with a prime number of divisors.
%C 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
%C 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
%H Amiram Eldar, <a href="/A345222/b345222.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F a(n) = Sum_{d|n} c(tau(d)), where c(n) is the prime characteristic.
%F From _Amiram Eldar_, Oct 06 2023: (Start)
%F Additive with a(p^e) = primepi(e+1).
%F 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)
%e 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.
%t Table[Sum[(PrimePi[DivisorSigma[0, k]] - PrimePi[DivisorSigma[0, k] - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
%t f[p_, e_] := PrimePi[e+1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a,100] (* _Amiram Eldar_, Oct 06 2023 *)
%o (PARI) a(n) = sumdiv(n, d, isprime(numdiv(d))); \\ _Michel Marcus_, Jun 11 2021
%Y Cf. A000005, A077761, A010051, A355937.
%K nonn,easy
%O 1,4
%A _Wesley Ivan Hurt_, Jun 11 2021