login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A294602 a(n) = pi(n-1) - pi(floor(n/2)), where pi is A000720. 2
0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 3, 3, 4, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 9, 9, 10, 10, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,8

COMMENTS

Number of primes in the interval (n/2, n).

Number of primes among the larger parts of the partitions of n into two distinct parts. For n=8, the partitions of 8 into two distinct parts are (7,1), (6,2), (5,3); 7 and 5 are prime so a(8) = 2. - Wesley Ivan Hurt, Apr 07 2018

LINKS

Table of n, a(n) for n=1..86.

FORMULA

a(n) = A056171(n) - A010051(n).

a(n) = Sum_{i=1..floor((n-1)/2)} A010051(n-i). - Wesley Ivan Hurt, Apr 07 2018

EXAMPLE

a(8) = 2 because there are 2 primes between 4 and 8: 5, 7.

a(19) = 3 because there are 3 primes between 9 and 19: 11, 13, 17.

MAPLE

A294602 := proc(n)

    numtheory[pi](n-1)-numtheory[pi](floor(n/2)) ;

end proc:

seq(A294602(n), n=1..120) ; # R. J. Mathar, Dec 17 2017

MATHEMATICA

Array[PrimePi[# - 1] - PrimePi[Floor[#/2]] &, 86] (* Michael De Vlieger, Nov 03 2017 *)

PROG

(MAGMA) [0, 0] cat [#PrimesInInterval(Floor(n/2)+1, n-1): n in [3..86]];

(PARI) vector(86, n, primepi(n-1)-primepi(n\2))

CROSSREFS

Cf. A000720, A001221, A010051, A056171.

Sequence in context: A198337 A206483 A087011 * A000174 A156268 A053257

Adjacent sequences:  A294599 A294600 A294601 * A294603 A294604 A294605

KEYWORD

nonn,easy

AUTHOR

Arkadiusz Wesolowski, Nov 03 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 8 02:15 EDT 2020. Contains 336287 sequences. (Running on oeis4.)