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!)
A174641 Smallest prime that begins a run of n consecutive primes that are not Ramanujan primes. 9
3, 3, 3, 73, 191, 191, 509, 2539, 2539, 5279, 9901, 9901, 9901, 11593, 11593, 55343, 55343, 55343, 55343, 55343, 174929, 174929, 174929, 225977, 225977, 225977, 225977, 225977, 534889, 534889, 534889, 534889, 534889, 534889, 534889, 534889, 2492317, 2492317 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The run of 10 consecutive non-Ramanujan primes was mentioned by Sondow.
LINKS
Dana Jacobsen, Table of n, a(n) for n = 1..107 (first 67 terms from T. D. Noe)
J. Sondow, Ramanujan primes and Bertrand's postulate, arXiv:0907.5232 [math.NT], 2009-2010.
J. Sondow, Ramanujan primes and Bertrand's postulate, Amer. Math. Monthly, 116 (2009) 630-635.
J. Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, arXiv:1105.2249 [math.NT], 2011.
J. Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, J. Integer Seq. 14 (2011) Article 11.6.2.
MATHEMATICA
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]]]
PROG
(Perl) use ntheory ":all";
my($k, $max, $start, $end, $inc, $p, $q, $r, $pi)
= (0, 0, 0, 10, 1e9, 0, 2, [], prime_iterator(3));
while (1) {
if (!@$r) {
($start, $end) = ($end+1, $end+$inc);
$r = ramanujan_primes($start, $end);
}
($p, $q, $k) = ($q, shift(@$r), 0);
# $k = prime_count($p+1, $q-1);
$k++ while $pi->() < $q;
say ++$max, " ", next_prime($p) while $k > $max;
}
# Dana Jacobsen, Jul 14 2016
CROSSREFS
Cf. A104272 (Ramanujan primes), A174635 (non-Ramanujan primes).
Cf. A174602 (runs of Ramanujan primes).
Sequence in context: A174538 A340821 A091323 * A217671 A118539 A015665
KEYWORD
nonn
AUTHOR
T. D. Noe, Nov 29 2010
STATUS
approved

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 May 1 09:02 EDT 2024. Contains 372163 sequences. (Running on oeis4.)