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!)
A123246 a(n) = PrimePi(n) + (-1)^(PrimePi(n) + 1) (cf. A000720). 1

%I #15 Oct 13 2018 09:08:57

%S -1,2,1,1,4,4,3,3,3,3,6,6,5,5,5,5,8,8,7,7,7,7,10,10,10,10,10,10,9,9,

%T 12,12,12,12,12,12,11,11,11,11,14,14,13,13,13,13,16,16,16,16,16,16,15,

%U 15,15,15,15,15,18,18,17,17,17,17,17,17,20,20,20,20,19,19,22,22,22,22,22,22,21,21,21,21,24,24,24,24,24,24,23,23,23,23

%N a(n) = PrimePi(n) + (-1)^(PrimePi(n) + 1) (cf. A000720).

%D Lynn Arthur Steen and J. Arthur Seebach, Jr., Counterexamples in Topology, Dover, New York, 1978, page 134.

%H G. C. Greubel, <a href="/A123246/b123246.txt">Table of n, a(n) for n = 1..10000</a>

%t f[n_] = PrimePi[n] + (-1)^(PrimePi[n] + 1); Table[f[n], {n, 1, 200}]

%o (PARI) a(n) = primepi(n) + (-1)^(primepi(n) + 1); \\ _Michel Marcus_, Oct 12 2018

%Y Cf. A000720, A055670, A103889.

%K sign

%O 1,2

%A _Roger L. Bagula_, Oct 07 2006

%E Edited by _N. J. A. Sloane_, Oct 08 2006

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