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!)
A282178 Primes for which the sum of all preceding odd-indexed prime gaps is exactly one greater than the sum of all preceding even-indexed prime gaps. 4

%I #108 Dec 15 2021 23:08:22

%S 3,7,43,79,107,1471,1579,1663,3491,3547,3659,3691,3719,3779,3823,3851,

%T 3947,4079,4583,4679,4703,27271,28643,28663,28711,29023,41603,41651,

%U 41999,42443,42787,42899,44263,44279,45971,50599,133979,28335623

%N Primes for which the sum of all preceding odd-indexed prime gaps is exactly one greater than the sum of all preceding even-indexed prime gaps.

%C If the counting numbers 1, 2, 3, ... are written out sequentially such that one unit is moved in a given direction each time a new number is written and such that the direction is reversed if and only if a prime number is reached, these are the primes that lie directly below the number 1.

%C Comments from _N. J. A. Sloane_, Dec 21 2019: (Start)

%C Let p(k) = k-th prime, Delta p(k) = p(k+1)-p(k). The sequence contains those primes q such that

%C Sum_{k odd, p(k+1) <= q} Delta p(k) = 1 + Sum_{k even, p(k+1) <= q} Delta p(k).

%C The boustrophedon path described in the first comment can be drawn as follows (it is very similar to the path in A330339):

%C -2.-1| 0..1..2..3..4..5..6..7..8..

%C ----------------------------------

%C .....|.1..2

%C .....|.3

%C .....|....4..5

%C .....|.7..6

%C .....|....8..9.10.11

%C .....|......13.12

%C .....|.........14.15.16.17

%C .....|............19.18

%C .....|...............20.21.22.23

%C .....|......29.28.27.26.25.24

%C .....|.........30.31

%C 37.36|35.34.33.32

%C ...

%C The primes that fall in column 0 make up the sequence.

%C Thanks to _Walter Trump_ for pointing out that this sequence is very similar to the Boustrophedon Primes sequence of A330339, and for correcting an omission in an earlier version of these comments.

%C The close relationship between the two sequences is demonstrated by the fact that the Boustrophedon Primes occur exactly when A330545 is 0, whereas the primes in the present sequence occur exactly when A330545 is 1 or 2.

%C Yet another way to relate the two sequences is to say that the present sequence gives all the primes > 2 in columns 1 and 2 of the triangle in A330339.

%C (End)

%C The primes (other than 2) occur only in even-numbered columns: primes congruent to 3 mod 4 occur in columns congruent to 0 mod 4, and primes congruent to 1 mod 4 occur in columns congruent to 2 mod 4. See the "Notes" link for proof. In particular, a(n) == 3 mod 4.- _N. J. A. Sloane_, Jan 04 2020

%C Frank Stevenson's data seems to suggest that a(n) is roughly growing like n^c where c is about 2.74. - _N. J. A. Sloane_, Dec 31 2019

%H Giovanni Resta, <a href="/A282178/b282178.txt">Table of n, a(n) for n = 1..28850</a> (first 846 terms from Robert G. Wilson v)

%H N. J. A. Sloane, <a href="/A330339/a330339.txt">Notes on the sequence of Bostrophedon primes (A330339) and the "ski-run" A330545.</a>

%H Frank Stevenson, <a href="/A282178/a282178.txt">Table of n, a(n) for n=1..163010</a>

%H Frank Stevenson, <a href="/A282178/a282178_5.png">Log-log histogram of first 163010 terms</a>.

%H Walter Trump, <a href="/A282178/a282178.png">The boustrophedon path as far as the prime 1741</a>. This covers the primes 3 through 1663 in the sequence (see the red dots). The rows are horizontal, alternately directed to the right and to the left.

%H Walter Trump, <a href="/A282178/a282178_1.png">The boustrophedon path as far as the prime 1741, drawn as a zig-zag</a>. This also covers the primes 3 through 1663 in the sequence. The rows slope downwards, alternately directed to the right and to the left.

%H Walter Trump, <a href="/A282178/a282178_2.png">The boustrophedon path as far as the prime 4999</a>. This covers the primes 3 through 4703 in the sequence (see the red dots). The rows are horizontal, alternately directed to the right and to the left.

%t With[{s = Differences@ Prime@ Range[10^5]}, Prime[1 + Position[Array[Total@ Take[s, {1, #, 2}] - Total@ Take[s, {2, #, 2}] &, Length@ s], 1][[All, 1]] ] ]

%o (PARI) my(a=2,n=1,pp=2);forprime(p=3,47000000,n++;a+= (-1)^(n+1)*(p-pp);if(a==1,print1(p,", "));pp=p) \\ _Hugo Pfoertner_, Dec 23 2019

%Y Cf. A001223, A330339 (Boustrophedon primes), A330545, A330547, A278603.

%Y The indices of these primes are given by A127596.

%K nonn

%O 1,1

%A _Samuel B. Reid_, Feb 07 2017

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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)