This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A066136 Primes are replaced by their local sequence number in A000040, while composites are replaced by their sequence number in A002808; (a kind of eigen- or home-indexing). 3
 0, 1, 2, 1, 3, 2, 4, 3, 4, 5, 5, 6, 6, 7, 8, 9, 7, 10, 8, 11, 12, 13, 9, 14, 15, 16, 17, 18, 10, 19, 11, 20, 21, 22, 23, 24, 12, 25, 26, 27, 13, 28, 14, 29, 30, 31, 15, 32, 33, 34, 35, 36, 16, 37, 38, 39, 40, 41, 17, 42, 18, 43, 44, 45, 46, 47, 19, 48, 49, 50, 20, 51, 21, 52, 53 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Harry J. Smith, Table of n, a(n) for n=1..1000 FORMULA a(n) = PrimePi(n) if n is prime; a(n) = n-PrimePi(n)-1 if n is not prime. EXAMPLE Primality or compositness is recognizable from the terms: if successor of a term(>2) is larger by one than the term, then it labels a composite number. a(n) = A026238(n), n>1. [R. J. Mathar, Sep 30 2008] MATHEMATICA Do[s=n; If[PrimeQ[n], Print[PrimePi[n]]]; If[ !PrimeQ[n], Print[n-PrimePi[n]-1]], {n, 1, 1000}] PROG (PARI) { for (n=1, 1000, if (isprime(n), a=primepi(n), a=n - primepi(n) - 1); write("b066136.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 02 2010 CROSSREFS Cf. A000040, A000720, A002808, A026238. Sequence in context: A253138 A283994 A026238 * A257902 A257909 A289439 Adjacent sequences:  A066133 A066134 A066135 * A066137 A066138 A066139 KEYWORD nonn AUTHOR Labos Elemer, Dec 07 2001 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 19 03:54 EDT 2019. Contains 325144 sequences. (Running on oeis4.)