login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087624 a(n)=0 if n is prime, A001221(n) otherwise. 8

%I #29 Nov 06 2022 12:23:46

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

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

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

%N a(n)=0 if n is prime, A001221(n) otherwise.

%C Number of prime divisors of n, but excluding n itself if n is prime.

%C Number of non-associated primes in the ring Z_n.

%C Also for n>1 the number of times n is crossed off in the sieve of Eratosthenes (A000040). [_Reinhard Zumkeller_, Oct 17 2008]

%C Number of primes that are proper divisors of n. [_Omar E. Pol_, Dec 27 2008]

%H N. J. A. Sloane, <a href="/A087624/b087624.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a> [From _Reinhard Zumkeller_, Oct 17 2008]

%F a(n) = A001221(n) * A005171(n). - _Jason Kimberley_, Nov 19 2014

%F G.f.: Sum_{k>=1} x^(2*prime(k)) / (1 - x^prime(k)). - _Ilya Gutkovskiy_, Apr 13 2021

%p with(numtheory); f:=proc(n) if isprime(n) then nops(factorset(n))-1 else nops(factorset(n)) fi; end;

%t Array[If[PrimeQ[#],0,PrimeNu[#]]&,110] (* _Harvey P. Dale_, Mar 27 2013 *)

%o (Haskell)

%o a087624 n = if a010051 n == 1 then 0 else a001221 n

%o -- _Reinhard Zumkeller_, Apr 05 2013

%o (PARI) a(n) = if (isprime(n), 0, omega(n)); \\ _Michel Marcus_, Nov 06 2022

%Y Cf. A001221, A010051, A087625.

%Y A144489 gives partial sums.

%K nonn,easy

%O 1,6

%A Michele Dondi (bik.mido(AT)tiscalinet.it), Sep 14 2003

%E Edited by _N. J. A. Sloane_, Dec 11 2008

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)