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.

A174641 Smallest prime that begins a run of n consecutive primes that are not Ramanujan primes.

Original entry on oeis.org

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
Offset: 1

Views

Author

T. D. Noe, Nov 29 2010

Keywords

Comments

The run of 10 consecutive non-Ramanujan primes was mentioned by Sondow.

Crossrefs

Cf. A104272 (Ramanujan primes), A174635 (non-Ramanujan primes).
Cf. A174602 (runs of Ramanujan primes).

Programs

  • 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
    				
  • 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