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!)
A159461 Numbers of previous and following composites of n-th prime. 2
0, 1, 2, 4, 4, 4, 4, 4, 8, 6, 6, 8, 4, 4, 8, 10, 6, 6, 8, 4, 6, 8, 8, 12, 10, 4, 4, 4, 4, 16, 16, 8, 6, 10, 10, 6, 10, 8, 8, 10, 6, 10, 10, 4, 4, 12, 22, 14, 4, 4, 8, 6, 10, 14, 10, 10, 6, 6, 8, 4, 10, 22, 16, 4, 4, 16, 18, 14, 10, 4, 8, 12, 12, 10, 8, 8, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Essentially the same as A046930. - R. J. Mathar, Apr 16 2009
For twin primes this is the gap before or after the twins, e.g., a(17) = 6 = 59 - 53 = prime(17) - prime(16) for the twin (59, 61) with a(18) = 6 = 67 - 61 = prime(19) - prime(18). - Frank Ellermann, Mar 17 2020
LINKS
FORMULA
For n >= 2, we have
a(n) = A001223(n) + A001223(n-1) - 2;
a(n) = A046933(n) + A046933(n-1);
a(n) = A008578(n+2) - A008578(n) - 2;
a(n) = A158611(n+3) - A158611(n+1) - 2.
EXAMPLE
For a(16) = 10 = 59 - 47 - 2 = prime(16+1) - prime(16-1) - 2 is the sum of the prime gaps minus two ending and starting at prime(16) = 53.
MATHEMATICA
Join[{0}, Total[Differences[#]-1]&/@Partition[Prime[Range[60]], 3, 1]] (* Harvey P. Dale, Nov 27 2011 *)
CROSSREFS
Sequence in context: A035661 A287393 A260085 * A046930 A302254 A160409
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Apr 12 2009
EXTENSIONS
Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010
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.)