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!)
A307989 a(n) = n - pi(2*n) + pi(n-1), where pi is the prime counting function. 0
0, 0, 1, 2, 3, 4, 4, 6, 6, 6, 7, 8, 9, 11, 11, 11, 12, 14, 14, 16, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 23, 25, 26, 26, 27, 27, 27, 29, 30, 30, 31, 32, 33, 35, 35, 36, 37, 39, 39, 40, 40, 40, 41, 42, 42, 43, 43, 44, 45, 47, 48, 50, 51, 51, 52, 52, 53, 55 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n) is the number of composites in the closed interval [n, 2n-1].
a(n) is also the number of composites among the largest parts of the partitions of 2n into two parts.
LINKS
FORMULA
a(n) = n - A035250(n).
a(n) = n - A000720(2*n) + A000720(n-1).
EXAMPLE
a(7) = 4; There are 7 partitions of 2*7 = 14 into two parts (13,1), (12,2), (11,3), (10,4), (9,5), (8,6), (7,7). Among the largest parts 12, 10, 9 and 8 are composite, so a(7) = 4.
MATHEMATICA
Table[n - PrimePi[2 n] + PrimePi[n - 1], {n, 100}]
CROSSREFS
Sequence in context: A162684 A265533 A145340 * A160680 A243069 A342496
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 09 2019
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 March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)