|
|
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
|
|
|
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;
}
|
|
CROSSREFS
|
Cf. A174602 (runs of Ramanujan primes).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|