login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005087 Number of distinct odd primes dividing n. 8
0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,15

COMMENTS

a(n) = A001221(n) - 1 + n mod 2. - Reinhard Zumkeller, Sep 03 2003

LINKS

Lei Zhou, Table of n, a(n) for n = 1..10000

FORMULA

Additive with a(p^e) = 0 if p = 2, 1 otherwise.

O.g.f. Sum_{p=odd prime} x^p/(1-x^p). - Geoffrey Critzer, Nov 06 2012

MATHEMATICA

nn=100; a=Sum[x^p/(1-x^p), {p, Table[Prime[n], {n, 2, nn}]}]; Drop[CoefficientList[Series[a, {x, 0, nn}], x], 1] (* Geoffrey Critzer, Nov 06 2012 *)

Array[PrimeNu[#] - Boole[EvenQ[#]] &, 102] (* Lei Zhou, Dec 03 2012 *)

PROG

(Sage)

def A005087(n) : return len(filter(is_prime, divisors(n))) + n % 2 - 1

[A005087(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012

(Haskell)

a005087 n = a001221 n + n `mod` 2 - 1 -- Reinhard Zumkeller, Feb 28 2014

CROSSREFS

Cf. A087436.

Sequence in context: A282355 A199322 A284203 * A050332 A216658 A214020

Adjacent sequences:  A005084 A005085 A005086 * A005088 A005089 A005090

KEYWORD

nonn

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from Reinhard Zumkeller, Sep 03 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 22 13:09 EST 2018. Contains 299454 sequences. (Running on oeis4.)