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.

A056561 Numbers n such that n^2 + n + 41 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78
Offset: 1

Views

Author

Henry Bottomley, Jun 26 2000

Keywords

Comments

Among first 100000 terms, the only run of 13 subsequent values >39 is 219..231. - Zak Seidov, Jan 28 2009
Number of terms less than 10^n: 1, 10, 86, 581, 4149, 31985, 261081, 2208197, 19132652, ... . - Robert G. Wilson v, Apr 20 2015
Complement of A007634. - Robert Israel, Apr 20 2015

Examples

			39 is in the sequence because 39^2+39+41=1601 which is prime but 40 is not because 40^2+40+41=1681=41*41.
		

References

  • P. Hoffman, Archimedes' Revenge, pp. 39-40,Penguin Books 1988.

Crossrefs

Programs

  • Haskell
    a056561 n = a056561_list !! (n-1)
    a056561_list = filter ((== 1) . a010051' . a202018) [0..]
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Magma
    [n: n in [0..80] |IsPrime(n^2 + n + 41)]; // Vincenzo Librandi, Sep 28 2012
    
  • Maple
    select(t -> isprime(t^2+t+41), [$0..100]); # Robert Israel, Apr 20 2015
  • Mathematica
    Select[Range[80], PrimeQ[#^2 + # + 41] &] (* Vincenzo Librandi, Sep 28 2012 *)
  • PARI
    is(n)=isprime(n^2+n+41) \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n) = (sqrt(4*A005846(n)-163)-1)/2.
a(n) = A002837(n+1)-1. - Robert Price, Nov 08 2019