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.
%I A330339 #117 Jul 09 2025 04:50:04 %S A330339 37,53,89,113,3821,3989,4657,28661,29021,41641,41669,44249,50909, %T A330339 56053,57041,57301,133981,16501361,46178761,47633441,47633477, %U A330339 47722049,47736121,47774621,47803477,47810209,47835013,47835341,47854969,47862413,47865017,49448573,49448617 %N A330339 Boustrophedon primes: write the numbers 0, 1, 2, 3, ... in a triangle on a square grid in the boustrophedon manner, ending a row when a prime is reached; sequence lists primes that appear in the zeroth column. %C A330339 Eric Angelini's illustration shows the first 19 rows of the triangle. Each row ends when a prime is reached, and the next row starts directly under this prime but moves in the opposite direction. %C A330339 The extended illustration from _Walter Trump_ resembles a giant ski run. %C A330339 _Hans Havermann_'s plots of A330545, linked here, extend Walter Trump's graph to 4*10^8 rows (probably the longest ski run in the world). Only the turns are shown, and the illustration has been turned sideways. %C A330339 A330545(k) = 0 iff prime(k) is a term of the present sequence. In a sense A330545 and the simpler A330547 are the more fundamental sequences and show the connection between the present problem and the ordinary primes and their alternating sums. %C A330339 Note that because primes > 2 are odd, a prime can only appear in column 0 at the end of a row that is moving towards the left. A prime appearing in a row moving to the right will always appear in an odd-numbered column (and in particular, not in the zero column). %C A330339 Furthermore the column number mod 4 uniquely determines the residue class of primes mod 4 in that column. If the column number is 0,1,2,3 mod 4 then the primes in that column are 1,3,3,1 respectively (see the "Notes" link). In particular, a(n) == 1 mod 4. - _N. J. A. Sloane_, Jan 04 2020 %C A330339 Note that the primes > 2 in column one and two are the primes in A282178. %C A330339 Note on the links: The illustrations from Angelini and Trump show all the terms 0,1,2,3,4,..., while those of Havermann and Sloane just show the primes (as in A330545). %H A330339 Giovanni Resta, <a href="/A330339/b330339.txt">Table of n, a(n) for n = 1..10000</a> (first 516 terms from Hans Havermann) %H A330339 Eric Angelini, <a href="/A330339/a330339.jpg">Illustration of beginning of the triangle in A330339.</a> %H A330339 Hans Havermann, <a href="/A330545/a330545.png">Plot of 4*10^8 terms of A330545</a>, sampled every 1000 terms, points joined. %H A330339 Hans Havermann, <a href="/A330545/a330545_1.png">More detailed view of terms of A330545 from 290 million to 310 million</a>, sampled every 10 terms, points joined. %H A330339 N. J. A. Sloane, <a href="/A330339/a330339.pdf">Illustration of first 16 rows of A330545.</a> %H A330339 N. J. A. Sloane, <a href="/A330339/a330339.txt">Notes on the sequence of Bostrophedon primes (A330339) and the "ski-run" A330545.</a> %H A330339 N. J. A. Sloane, <a href="/A330339/a330339_1.pdf">State diagram for columns of A330545.</a> %H A330339 Walter Trump, <a href="/A330339/a330339.png">An extended picture of the triangle in A330339, showing the first 550 rows, down to the row that starts 3989.</a> [The zeroth column is just to the right of the vertical red line. Note that after a while the rows extend to the left of the red line. The digits are too small to be read.] %H A330339 Walter Trump, <a href="/A330339/a330339_1.png">An extended picture of the triangle in A330339, showing the first 550 rows, down to the row that starts 3989.</a> [Same picture as the previous one, but with 6 red dots added to show the primes in column 0.] %Y A330339 Cf. A282178, A330545, A330547. %Y A330339 A330546 gives the list of indices i such that a(n) = prime(i). %Y A330339 A127596 is another sequence with a similar flavor. %Y A330339 Not to be confused with A000747 = Boustrophedon transform of primes. %K A330339 nonn %O A330339 1,1 %A A330339 _N. J. A. Sloane_, Dec 17 2019, following a suggestion from _Eric Angelini_. a(5) and a(6) were found by _Walter Trump_. a(7)-a(17) from _N. J. A. Sloane_, Dec 17 2019 %E A330339 More terms from _Hans Havermann_, Dec 17 2019