login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = card { d | d*p = n, d odd, p prime }
5

%I #32 Sep 21 2024 08:42:21

%S 0,1,1,0,1,1,1,0,1,1,1,0,1,1,2,0,1,1,1,0,2,1,1,0,1,1,1,0,1,1,1,0,2,1,

%T 2,0,1,1,2,0,1,1,1,0,2,1,1,0,1,1,2,0,1,1,2,0,2,1,1,0,1,1,2,0,2,1,1,0,

%U 2,1,1,0,1,1,2,0,2,1,1,0,1,1,1,0,2,1,2

%N a(n) = card { d | d*p = n, d odd, p prime }

%C Equivalently, a(n) is the number of prime divisors p|n such that n/p is odd. - _Gus Wiseman_, Jun 06 2018

%H Charles R Greathouse IV, <a href="/A205745/b205745.txt">Table of n, a(n) for n = 1..10000</a>

%F O.g.f.: Sum_{p prime} x^p/(1 - x^(2p)). - _Gus Wiseman_, Jun 06 2018

%F Sum_{k=1..n} a(k) = (n/2) * (log(log(n)) + B) + O(n/log(n)), where B is Mertens's constant (A077761). - _Amiram Eldar_, Sep 21 2024

%t a[n_] := Sum[ Boole[ OddQ[d] && PrimeQ[n/d] ], {d, Divisors[n]} ]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jun 27 2013 *)

%o (Sage)

%o def A205745(n):

%o return sum((n//d) % 2 for d in divisors(n) if is_prime(d))

%o [A205745(n) for n in (1..105)]

%o (PARI) a(n)=if(n%2,omega(n),n%4/2) \\ _Charles R Greathouse IV_, Jan 30 2012

%o (Haskell)

%o a205745 n = sum $ map ((`mod` 2) . (n `div`))

%o [p | p <- takeWhile (<= n) a000040_list, n `mod` p == 0]

%o -- _Reinhard Zumkeller_, Jan 31 2012

%Y Cf. A000005, A000607, A001221, A008683, A010051, A068050, A077761, A083399, A088705, A106404, A305614.

%K nonn

%O 1,15

%A _Peter Luschny_, Jan 30 2012