A166687 Numbers of the form x^2 + y^2 + 1, x, y integers.
1, 2, 3, 5, 6, 9, 10, 11, 14, 17, 18, 19, 21, 26, 27, 30, 33, 35, 37, 38, 41, 42, 46, 50, 51, 53, 54, 59, 62, 65, 66, 69, 73, 74, 75, 81, 82, 83, 86, 90, 91, 98, 99, 101, 102, 105, 107, 110, 114, 117, 118, 122, 123, 126, 129, 131, 137, 138, 145, 146, 147, 149, 150, 154, 158, 161
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Jia Hong Ray Ng, Quarternions and the four square theorem, 2008 Summer VIGRE Program for Undergraduates
- Yu-Chen Sun and Hao Pan, The Green-Tao theorem for primes of the form x^2 + y^2 + 1, Monatshefte für Mathematik vol. 189 (2019), pp. 715-733. arXiv:1708.08629 [math.NT]
Programs
-
Maple
N:= 1000: # to get all terms <= N S:= {seq(seq(x^2+y^2+1,y=0..floor(sqrt(N-1-x^2))),x=0..floor(sqrt(N-1)))}: sort(convert(S,list)); # Robert Israel, Jan 05 2016
-
Mathematica
Select[Range@ 162, Resolve[Exists[{x, y}, Reduce[# == x^2 + y^2 + 1, {x, y}, Integers]]] &] (* Michael De Vlieger, Jan 05 2016 *)
-
PARI
is(n)=my(f=factor(n-1)); for(i=1, #f~, if(f[i,1]%4==3 && f[i,2]%2, return(0))); 1 \\ Charles R Greathouse IV, Jan 04 2016
-
PARI
list(lim)=my(v=List(),t); lim\=1; for(m=0,sqrtint(lim-1), t=m^2+1; for(n=0, min(sqrtint(lim-t),m), listput(v,t+n^2))); Set(v) \\ Charles R Greathouse IV, Jan 05 2016
Comments