|
|
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
|
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
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|