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!)
A247977 If n = 1 or prime, then a(n) = 0; otherwise, if n is a preprime of k-th kind, then a(n) = k. 1
0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 3, 2, 3, 0, 3, 0, 3, 2, 3, 1, 3, 0, 3, 2, 3, 0, 3, 0, 3, 2, 3, 0, 3, 1, 4, 3, 4, 0, 4, 2, 4, 3, 4, 0, 4, 0, 4, 3, 4, 2, 4, 0, 4, 3, 4, 0, 4, 0, 4, 3, 4, 1, 4, 0, 4, 3, 4, 0, 4, 2, 4, 3, 4, 0, 4, 1, 4, 3, 4, 2, 4, 0, 4, 3, 4, 0, 4, 0, 4, 3, 4, 0, 4, 0, 4, 3, 4, 0, 4, 2, 4, 3, 4, 1, 4, 1, 5, 4, 5, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
Preprimes of k-th kind are defined in comment in A247395.
LINKS
FORMULA
If n is a composite number, then a(n) = pi(sqrt(n)) - pi(lpf(n)) + 1, where pi(x) is prime counting function (cf. A000720), lpf = least prime factor (A020639).
EXAMPLE
If n = 15, then, by the formula, we have a(15) = 2 - 2 + 1 = 1.
MATHEMATICA
Table[If[n==1 || PrimeQ[n], 0, PrimePi[Sqrt[n]] - PrimePi[FactorInteger[n][[1, 1]]] + 1], {n, 1, 125}] (* Indranil Ghosh, Mar 08 2017 *)
PROG
(PARI) for(n=1, 125, print1(if(n==1 || isprime(n), 0, primepi(sqrt(n)) - primepi(vecmin(factor(n)[, 1])) + 1), ", ")) \\ Indranil Ghosh, Mar 08 2017
CROSSREFS
Sequence in context: A339927 A227957 A305575 * A359239 A143232 A329981
KEYWORD
nonn,look
AUTHOR
Vladimir Shevelev, Sep 28 2014
STATUS
approved

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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)