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!)
A246514 Number of composite numbers between prime(n) and 2*prime(n) exclusive. 2
0, 1, 3, 4, 7, 9, 12, 14, 17, 22, 23, 27, 31, 33, 37, 41, 45, 48, 53, 56, 59, 63, 67, 72, 77, 80, 83, 87, 90, 94, 103, 107, 111, 113, 121, 124, 128, 134, 138, 144, 148, 150, 158, 160, 164, 166, 175, 184, 188, 190, 193, 199, 201, 209, 214, 219, 226, 228, 234 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) + A070046(n) = number of numbers between prime(n) and 2*prime(n), which is prime(n)-1. - N. J. A. Sloane, Aug 28 2014
EXAMPLE
2 P 4 = 0,
3 4 P 6 = 1,
5 6 P 8 9 10 = 3,
7 8 9 10 P 12 P 14 = 4,
11 12 P 14 15 16 P 18 P 20 21 22 = 7
and so on.
PROG
(PARI) s=[]; forprime(p=2, 1000, n=0; for(q=p+1, 2*p-1, if(!isprime(q), n++)); s=concat(s, n)); s \\ Colin Barker, Aug 28 2014
(PARI) a(n)=prime(n)+n-1-primepi(2*prime(n))
vector(100, n, a(n)) \\ Faster program. Jens Kruse Andersen, Aug 28 2014
CROSSREFS
Sequence in context: A198772 A185256 A070992 * A060142 A049844 A369568
KEYWORD
nonn,easy
AUTHOR
Odimar Fabeny, Aug 28 2014
EXTENSIONS
More terms from Colin Barker, Aug 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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)