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

%I #42 Apr 04 2020 17:14:08

%S 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,

%T 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,

%U 10,22,16,4,4,16,18,14,10,4,8,12,12,10,8,8,12

%N Numbers of previous and following composites of n-th prime.

%C Essentially the same as A046930. - _R. J. Mathar_, Apr 16 2009

%C 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

%H Harvey P. Dale, <a href="/A159461/b159461.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Pri#gaps">Index entries for gaps between primes</a>.

%F For n >= 2, we have

%F a(n) = A001223(n) + A001223(n-1) - 2;

%F a(n) = A046933(n) + A046933(n-1);

%F a(n) = A008578(n+2) - A008578(n) - 2;

%F a(n) = A158611(n+3) - A158611(n+1) - 2.

%e 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.

%t Join[{0},Total[Differences[#]-1]&/@Partition[Prime[Range[60]],3,1]] (* _Harvey P. Dale_, Nov 27 2011 *)

%Y Cf. A000040, A001223, A046933, A008578, A158611.

%K nonn

%O 1,3

%A _Jaroslav Krizek_, Apr 12 2009

%E Correction for change of offset in A158611 and A008578 in Aug 2009 _Jaroslav Krizek_, Jan 27 2010

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 July 4 15:09 EDT 2024. Contains 373994 sequences. (Running on oeis4.)