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.
%I A166687 #19 Mar 26 2022 00:30:36 %S A166687 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, %T A166687 53,54,59,62,65,66,69,73,74,75,81,82,83,86,90,91,98,99,101,102,105, %U A166687 107,110,114,117,118,122,123,126,129,131,137,138,145,146,147,149,150,154,158,161 %N A166687 Numbers of the form x^2 + y^2 + 1, x, y integers. %C A166687 A001481 is the main entry for this sequence. %C A166687 As Ng points out (Lemma 2.2), each prime divides some member of this sequence: 2 divides a(2) = 2, 3 divides a(3) = 3, 5 divides a(4) = 5, 7 divides a(9) = 14, etc. - _Charles R Greathouse IV_, Jan 04 2016 %H A166687 Robert Israel, <a href="/A166687/b166687.txt">Table of n, a(n) for n = 1..10000</a> %H A166687 Jia Hong Ray Ng, <a href="http://www.math.uchicago.edu/~may/VIGRE/VIGRE2008/REUPapers/Ng.pdf">Quarternions and the four square theorem</a>, 2008 Summer VIGRE Program for Undergraduates %H A166687 Yu-Chen Sun and Hao Pan, <a href="https://arxiv.org/abs/1708.08629">The Green-Tao theorem for primes of the form x^2 + y^2 + 1</a>, Monatshefte für Mathematik vol. 189 (2019), pp. 715-733. arXiv:1708.08629 [math.NT] %p A166687 N:= 1000: # to get all terms <= N %p A166687 S:= {seq(seq(x^2+y^2+1,y=0..floor(sqrt(N-1-x^2))),x=0..floor(sqrt(N-1)))}: %p A166687 sort(convert(S,list)); # _Robert Israel_, Jan 05 2016 %t A166687 Select[Range@ 162, Resolve[Exists[{x, y}, Reduce[# == x^2 + y^2 + 1, {x, y}, Integers]]] &] (* _Michael De Vlieger_, Jan 05 2016 *) %o A166687 (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 %o A166687 (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 %Y A166687 Cf. A000408, A000378, A005767, A169580, A166265, A079545. %K A166687 nonn %O A166687 1,2 %A A166687 _N. J. A. Sloane_, Mar 05 2010