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.

A046789 Lower prime of the second gap of 2n between primes.

This page as a plain text file.
%I A046789 #41 Oct 14 2022 04:15:35
%S A046789 5,13,31,359,181,211,293,1933,1069,1637,1951,2179,3137,3271,4831,
%T A046789 10799,8467,12853,38393,20809,34981,36389,91033,73189,45893,25471,
%U A046789 40289,153191,58831,102701,190409,107377,221327,290249,175141,360091
%N A046789 Lower prime of the second gap of 2n between primes.
%D A046789 Enoch Haga, Exploring Prime Numbers on Your PC, 2nd edition, 1998, ISBN 1-885794-16-9, Table 4, pages 38-39.
%H A046789 Robert G. Wilson v, <a href="/A046789/b046789.txt">Table of n, a(n) for n = 1..257</a>
%F A046789 a(n) = A000230(n) + A046728(n). - _Robert G. Wilson v_, Nov 26 2020
%e A046789 The second prime gap of 4 is at 13 to 17, so a(2)=13.
%t A046789 Flatten[Table[First /@ Take[Select[Partition[Prime[Range[32000]], 2, 1], Differences[#] == {2 n} &], {2}], {n, 36}]] (* _Jayanta Basu_, Jun 28 2013 *)
%t A046789 tt[_] := -2; p0 = NextPrime@2; p1 = NextPrime@p0; While[p0 < 25000000, diff = (p1 - p0)/2; If[tt[diff] == -1, tt[diff] = p0]; If[tt[diff] == -2, tt[diff] = -1]; {p0, p1} = {p1, NextPrime@p1}]; tt@# & /@ Range@77 (* _Robert G. Wilson v_, Nov 26 2020 *)
%Y A046789 Cf. A000230, A046728.
%K A046789 nonn
%O A046789 1,1
%A A046789 _Jud McCranie_