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!)
A161811 Difference between nonprime(n+2) and nonprime(n). 1
4, 5, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 3, 2, 2, 2, 3, 4, 3, 2, 2, 2, 3, 3, 2, 3, 4, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 4, 3, 2, 2, 2, 3, 3, 2, 3, 4, 3, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
"nonprime(n)" is used for "n-th nonprime". Here the nonprimes start at 0 (see A141468), so nonprime(1) to nonprime(15) are 0, 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22.
LINKS
FORMULA
a(n) = A141468(n+2)-A141468(n).
EXAMPLE
nonprime(1+2)-nonprime(1) = 4-0; so a(1) = 4.
nonprime(5+2)-nonprime(5) = 10-8; so a(5) = 2.
nonprime(11+2)-nonprime(11) = 20-16; so a(11) = 4.
MATHEMATICA
#[[3]]-#[[1]]&/@Partition[Select[Range[0, 150], !PrimeQ[#]&], 3, 1] (* Harvey P. Dale, Jul 08 2022 *)
CROSSREFS
Sequence in context: A366610 A175622 A071413 * A016717 A366153 A031349
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited, corrected (a(11)=2 replaced by 4) and extended by Klaus Brockhaus, Jun 24 2009
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 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)