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.

A014556 Euler's "Lucky" numbers: n such that m^2-m+n is prime for m=0..n-1.

Original entry on oeis.org

2, 3, 5, 11, 17, 41
Offset: 1

Views

Author

Keywords

Comments

Same as n such that 4n-1 is a Heegner number 1,2,3,7,11,19,43,67,163 (see A003173 and Conway and Guy's book).

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 225.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 41, p. 16, Ellipses, Paris 2008.
  • I. N. Herstein and I. Kaplansky, Matters Mathematical, Chelsea, NY, 2nd. ed., 1978, see p. 38.
  • F. Le Lionnais, Les Nombres Remarquables. Paris: Hermann, pp. 88 and 144, 1983.

Crossrefs

Programs

  • Mathematica
    A003173 = Union[Select[-NumberFieldDiscriminant[Sqrt[-#]] & /@ Range[200], NumberFieldClassNumber[Sqrt[-#]] == 1 &] /. {4 -> 1, 8 -> 2}]; a[n_] := (A003173[[n + 4]] + 1)/4; Table[a[n], {n, 0, 5}] (* Jean-François Alcover, Jul 16 2012, after M. F. Hasler *)
    Select[Range[50],AllTrue[Table[m^2-m+#,{m,0,#-1}],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 12 2017 *)
  • PARI
    is(n)=n>1 && qfbclassno(1-4*n)==1 \\ Charles R Greathouse IV, Jan 29 2013
    
  • PARI
    is(p)=for(n=1,p-1, if(!isprime(n*(n-1)+p),return(0))); 1 \\ naive; Charles R Greathouse IV, Aug 26 2022
    
  • PARI
    is(p)=for(n=1,sqrt(p/3)\/1, if(!isprime(n*(n-1)+p),return(0))); 1 \\ Charles R Greathouse IV, Aug 26 2022

Formula

a(n) = (A003173(n+3) + 1)/4. - M. F. Hasler, Nov 03 2008