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 A174641 #44 Oct 30 2023 07:36:50 %S A174641 3,3,3,73,191,191,509,2539,2539,5279,9901,9901,9901,11593,11593,55343, %T A174641 55343,55343,55343,55343,174929,174929,174929,225977,225977,225977, %U A174641 225977,225977,534889,534889,534889,534889,534889,534889,534889,534889,2492317,2492317 %N A174641 Smallest prime that begins a run of n consecutive primes that are not Ramanujan primes. %C A174641 The run of 10 consecutive non-Ramanujan primes was mentioned by Sondow. %H A174641 Dana Jacobsen, <a href="/A174641/b174641.txt">Table of n, a(n) for n = 1..107</a> (first 67 terms from T. D. Noe) %H A174641 J. Sondow, <a href="http://arxiv.org/abs/0907.5232">Ramanujan primes and Bertrand's postulate</a>, arXiv:0907.5232 [math.NT], 2009-2010. %H A174641 J. Sondow, <a href="https://www.jstor.org/stable/40391170">Ramanujan primes and Bertrand's postulate</a>, Amer. Math. Monthly, 116 (2009) 630-635. %H A174641 J. Sondow, J. W. Nicholson, and T. D. Noe, <a href="https://arxiv.org/abs/1105.2249">Ramanujan Primes: Bounds, Runs, Twins, and Gaps</a>, arXiv:1105.2249 [math.NT], 2011. %H A174641 J. Sondow, J. W. Nicholson, and T. D. Noe, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Noe/noe12.html">Ramanujan Primes: Bounds, Runs, Twins, and Gaps</a>, J. Integer Seq. 14 (2011) Article 11.6.2. %t A174641 nn=10000; t=Table[0, {nn}]; len=Prime[3*nn]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s<nn, t[[s+1]]=k], {k, len}]; t=t+1; t=Complement[Prime[Range[PrimePi[t[[-1]]]]], t]; ind=PrimePi[t]; d=Differences[ind]; cnt=0; n=1; Join[{2}, Reap[Do[If[d[[i]]==1, cnt++; If[cnt==n, Sow[t[[i-n+1]]]; n++], cnt=0], {i, Length[d]}]][[2, 1]]] %o A174641 (Perl) use ntheory ":all"; %o A174641 my($k, $max, $start, $end, $inc, $p, $q, $r, $pi) %o A174641 = (0, 0, 0, 10, 1e9, 0, 2, [], prime_iterator(3)); %o A174641 while (1) { %o A174641 if (!@$r) { %o A174641 ($start, $end) = ($end+1, $end+$inc); %o A174641 $r = ramanujan_primes($start, $end); %o A174641 } %o A174641 ($p, $q, $k) = ($q, shift(@$r), 0); %o A174641 # $k = prime_count($p+1,$q-1); %o A174641 $k++ while $pi->() < $q; %o A174641 say ++$max," ",next_prime($p) while $k > $max; %o A174641 } %o A174641 # _Dana Jacobsen_, Jul 14 2016 %Y A174641 Cf. A104272 (Ramanujan primes), A174635 (non-Ramanujan primes). %Y A174641 Cf. A174602 (runs of Ramanujan primes). %Y A174641 Cf. A202187, A202188. %K A174641 nonn %O A174641 1,1 %A A174641 _T. D. Noe_, Nov 29 2010