cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A282178 #108 Dec 15 2021 23:08:22
%S A282178 3,7,43,79,107,1471,1579,1663,3491,3547,3659,3691,3719,3779,3823,3851,
%T A282178 3947,4079,4583,4679,4703,27271,28643,28663,28711,29023,41603,41651,
%U A282178 41999,42443,42787,42899,44263,44279,45971,50599,133979,28335623
%N 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.
%C A282178 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 A282178 Comments from _N. J. A. Sloane_, Dec 21 2019: (Start)
%C A282178 Let p(k) = k-th prime, Delta p(k) = p(k+1)-p(k). The sequence contains those primes q such that
%C A282178   Sum_{k odd, p(k+1) <= q} Delta p(k) = 1 + Sum_{k even, p(k+1) <= q} Delta p(k).
%C A282178 The boustrophedon path described in the first comment can be drawn as follows (it is very similar to the path in A330339):
%C A282178 -2.-1| 0..1..2..3..4..5..6..7..8..
%C A282178 ----------------------------------
%C A282178 .....|.1..2
%C A282178 .....|.3
%C A282178 .....|....4..5
%C A282178 .....|.7..6
%C A282178 .....|....8..9.10.11
%C A282178 .....|......13.12
%C A282178 .....|.........14.15.16.17
%C A282178 .....|............19.18
%C A282178 .....|...............20.21.22.23
%C A282178 .....|......29.28.27.26.25.24
%C A282178 .....|.........30.31
%C A282178 37.36|35.34.33.32
%C A282178 ...
%C A282178 The primes that fall in column 0 make up the sequence.
%C A282178 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 A282178 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 A282178 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 A282178 (End)
%C A282178 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 A282178 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 A282178 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 A282178 N. J. A. Sloane, <a href="/A330339/a330339.txt">Notes on the sequence of Bostrophedon primes (A330339) and the "ski-run" A330545.</a>
%H A282178 Frank Stevenson, <a href="/A282178/a282178.txt">Table of n, a(n) for n=1..163010</a>
%H A282178 Frank Stevenson, <a href="/A282178/a282178_5.png">Log-log histogram of first 163010 terms</a>.
%H A282178 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 A282178 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 A282178 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 A282178 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 A282178 (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 A282178 Cf. A001223, A330339 (Boustrophedon primes), A330545, A330547, A278603.
%Y A282178 The indices of these primes are given by A127596.
%K A282178 nonn
%O A282178 1,1
%A A282178 _Samuel B. Reid_, Feb 07 2017