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-3 of 3 results.

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

A159828 a(n) is smallest number m > 0 such that m^2 + n^2 + 1 is prime.

Original entry on oeis.org

1, 6, 1, 6, 9, 2, 3, 6, 1, 6, 3, 2, 3, 6, 1, 6, 27, 8, 9, 24, 1, 6, 21, 4, 69, 12, 3, 6, 21, 6, 3, 6, 1, 6, 9, 2, 9, 6, 1, 6, 15, 6, 9, 6, 1, 6, 27, 2, 3, 36, 9, 6, 3, 6, 15, 18, 1, 48, 3, 4, 9, 6, 7, 6, 15, 4, 21, 42, 5, 6, 3, 2, 69, 18, 5, 6, 3, 2, 9, 24, 1, 6, 3, 8, 9, 6, 11, 18, 15, 4, 3, 6, 7, 18
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 23 2009

Keywords

Comments

a(2k-1) is odd, a(2k) is even.
There are infinitely many primes of the forms n^2 + m^2 and n^2 + m^2 + 1, but it is not known if the number of primes of the form n^2 + 1 is infinite; cf. comments in A002496, A002313, A079544.

Examples

			n = 1: 1^2 + 1^2 + 1 = 3 is prime, so a(1) = 1.
n = 2: 1^2 + 2^2 + 1 = 6, 2^2 + 2^2 + 1 = 9, 3^2 + 2^2 + 1 = 14, 4^2 + 2^2 + 1 = 21, 5^2 + 2^2 + 1 = 30 are composite, but 6^2 + 2^2 + 1 = 41 is prime, so a(2) = 6.
n = 27: 1^2 + 27^2 + 1 = 731 = 17*43, 2^2 + 27^2 + 1 = 734 = 2*367 are composite, but 3^2 + 27^2 + 1 = 739 is prime, so a(27) = 3.
		

Crossrefs

Cf. A069003 (smallest d such that n^2+d^2 is prime), A002496 (primes of form n^2+1), A002313 (primes of form x^2+y^2), A079544 (primes of form x^2+y^2+1, x>0, y>0).

Programs

  • Magma
    S:=[]; for n in [1..100] do q:=n^2+1; m:=1; while not IsPrime(m^2+q) do m+:=1; end while; Append(~S,m); end for; S; // Klaus Brockhaus, May 21 2009
  • Mathematica
    snm[n_]:=Module[{c=n^2+1,x=NextPrime[n^2+1]},While[!IntegerQ[Sqrt[x-c]], x= NextPrime[x]];Sqrt[x-c]]; Array[snm,100] (* Harvey P. Dale, Sep 22 2018 *)

Extensions

Edited and extended by Klaus Brockhaus, May 21 2009

A340778 Decimal expansion of (2 - e*log(2))/4.

Original entry on oeis.org

0, 2, 8, 9, 5, 7, 6, 5, 3, 6, 5, 9, 0, 6, 9, 9, 7, 2, 5, 2, 4, 4, 6, 0, 2, 2, 0, 7, 6, 8, 6, 4, 9, 6, 6, 6, 3, 2, 5, 6, 8, 3, 7, 3, 5, 8, 8, 6, 3, 1, 4, 6, 5, 3, 4, 7, 6, 8, 4, 8, 3, 8, 0, 0, 4, 9, 2, 8, 0, 4, 4, 8, 6, 2, 8, 8, 2, 8, 8, 4, 9, 4, 3, 8, 8, 0, 5, 8
Offset: 0

Views

Author

Stefano Spezia, Jan 21 2021

Keywords

Comments

This constant appears in an asymptotic formula proved by Linnik in 1960 in an additive problem of Hardy-Littlewood (see Formula 1 in Dimitrov and Formula 0.3 in Linnik).

Examples

			0.02895765365906997252446022076864966632568373588631465...
		

Crossrefs

Programs

  • Mathematica
    First[RealDigits[N[(2-E*Log[2])/4,87]]]
Showing 1-3 of 3 results.