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.

A064361 Numbers k such that prime(k)^2 + k is prime.

Original entry on oeis.org

1, 2, 4, 12, 18, 22, 30, 42, 52, 82, 84, 126, 142, 174, 178, 180, 186, 192, 198, 216, 220, 240, 252, 262, 298, 316, 348, 382, 400, 406, 412, 438, 478, 480, 492, 520, 522, 532, 546, 576, 604, 610, 630, 700, 730, 744, 784, 790, 832, 840, 852, 862, 904, 916, 940
Offset: 1

Views

Author

Jason Earls, Sep 26 2001

Keywords

Programs

  • Mathematica
    Select[ Range[ 1000 ], PrimeQ[ Prime[ # ]^2 + # ] & ]
  • PARI
    j=[]; for(n=1,1500, if(isprime(prime(n)^2+n), j=concat(j,n))); j
    
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(prime(m)^2 + m), write("b064361.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 12 2009