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.

A079545 Primes of the form x^2 + y^2 + 1 with x,y >= 0.

Original entry on oeis.org

2, 3, 5, 11, 17, 19, 37, 41, 53, 59, 73, 83, 101, 107, 131, 137, 149, 163, 179, 181, 197, 227, 233, 251, 257, 293, 307, 347, 389, 401, 443, 467, 491, 521, 523, 563, 577, 587, 593, 613, 641, 677, 739, 773, 809, 811, 821, 883
Offset: 1

Views

Author

N. J. A. Sloane, Jan 23 2003

Keywords

Comments

Bredihin proves that this sequence is infinite. Motohashi improves the upper and lower bounds. - Charles R Greathouse IV, Sep 16 2011
Sun & Pan prove that there are arbitrarily long arithmetic progressions in this sequence. - Charles R Greathouse IV, Mar 03 2018
For this sequence in short intervals, see Wu and Matomäki; for its Goldbach problem, see Teräväinen. - Charles R Greathouse IV, Oct 10 2018

Examples

			17 = 0^2 + 4^2 + 1 is prime so in this sequence.
		

Crossrefs

Primes in A166687.

Programs

  • Mathematica
    Select[Select[Range[1000], SquaresR[2, #] != 0&]+1, PrimeQ] (* Jean-François Alcover, Aug 31 2018 *)
  • PARI
    list(lim)={
        my(A,t,v=List([2]));
        forstep(a=2,sqrt(lim-1),2,
            A=a^2+1;
            forstep(b=0,min(a,sqrt(lim-A)),2,
                if(isprime(t=A+b^2),listput(v,t))
            )
        );
        forstep(a=1,sqrt(lim-2),2,
            A=a^2+1;
            forstep(b=1,min(a,sqrt(lim-A)),2,
                if(isprime(t=A+b^2),listput(v,t))
            )
        );
        vecsort(Vec(v),,8)
    }; \\ Charles R Greathouse IV, Sep 16 2011
    
  • PARI
    is(n)=for(x=sqrtint(n\2),sqrtint(n-1), if(issquare(n-x^2-1), return(isprime(n)))); 0 \\ Charles R Greathouse IV, Jun 12 2015
    
  • PARI
    B=bnfinit('x^2+1);
    is(n)=!!#bnfisintnorm(B,n-1) && isprime(n) \\ Charles R Greathouse IV, Jun 13 2015

Formula

Iwaniec proves that a(n) ≍ n (log n)^(3/2), that is, n (log n)^(3/2) << a(n) << n (log n)^(3/2). - Charles R Greathouse IV, Mar 06 2018