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.

Showing 1-4 of 4 results.

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

A094749 Triangle read by rows in which the n-th row contains the least set of n successive primes whose successive difference forms an arithmetic progression with common difference 2, (successive even numbers).

Original entry on oeis.org

2, 3, 5, 5, 7, 11, 17, 19, 23, 29, 347, 349, 353, 359, 367, 2903, 2909, 2917, 2927, 2939, 2953, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 128981, 128983, 128987, 128993, 129001, 129011, 129023, 129037, 95285633, 95285639, 95285647, 95285657
Offset: 1

Views

Author

Amarnath Murthy, May 24 2004

Keywords

Comments

The difference between the first two primes in each row does not have to be two; what is required is that the second differences between the primes in each row are all twos. - Harvey P. Dale, Aug 09 2020

Examples

			2
3 5
5 7 11
17 19 23 29
...
		

Crossrefs

Programs

  • Mathematica
    Module[{prs=Prime[Range[551*10^4]],nn=9},Join[{2,3,5},Table[ SelectFirst[ Partition[ prs,n,1],Union[Differences[#,2]]=={2}&],{n,3,nn}]]// Flatten] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 09 2020 *)

Extensions

More terms from David Wasserman, Jun 07 2007

A208645 Least x>0 such that x^2+x+n is not prime.

Original entry on oeis.org

2, 4, 1, 2, 1, 4, 1, 1, 1, 2, 1, 10, 1, 1, 1, 2, 1, 16, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 40, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 03 2012

Keywords

Comments

By definition, a(n)>0 for all n, and a(n)>1 if n+2 is prime.

Examples

			a(0)=2 since 1^2+1+0=2 is prime, but 2^2+2+0=6 is composite.
a(1)=4 since 1^2+1+1=2, 2^2+2+1=7 and 3^2+3+1=13 are prime, but 4^2+4+1=21 is composite.
		

Crossrefs

Programs

  • Mathematica
    lx[n_]:=Module[{x=1},While[PrimeQ[x^2+x+n],x++];x]; Array[lx, 90, 0] (* Harvey P. Dale, Aug 14 2013 *)
  • PARI
    a(n)=for( x=1, n+3, isprime(x^2+x+n) || return(x))

A164597 a(n) = the largest integer such that {the n-th prime} + k(k + 1) is prime for all k where 0 <= k <= a(n).

Original entry on oeis.org

0, 1, 3, 0, 9, 0, 15, 0, 0, 1, 0, 0, 39, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Leroy Quet, Aug 17 2009

Keywords

Comments

a(n) <= the n-th prime -2, for all n.

Crossrefs

Extensions

More terms from R. J. Mathar, Sep 27 2009
Showing 1-4 of 4 results.