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”).

A205745
a(n) = card { d | d*p = n, d odd, p prime }
5
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, 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, 2, 1, 1, 0, 1, 1, 2, 0, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 2
OFFSET
1,15
COMMENTS
Equivalently, a(n) is the number of prime divisors p|n such that n/p is odd. - Gus Wiseman, Jun 06 2018
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
O.g.f.: Sum_{p prime} x^p/(1 - x^(2p)). - Gus Wiseman, Jun 06 2018
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
MATHEMATICA
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 *)
PROG
(Sage)
def A205745(n):
return sum((n//d) % 2 for d in divisors(n) if is_prime(d))
[A205745(n) for n in (1..105)]
(PARI) a(n)=if(n%2, omega(n), n%4/2) \\ Charles R Greathouse IV, Jan 30 2012
(Haskell)
a205745 n = sum $ map ((`mod` 2) . (n `div`))
[p | p <- takeWhile (<= n) a000040_list, n `mod` p == 0]
-- Reinhard Zumkeller, Jan 31 2012
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 30 2012
STATUS
approved