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 A159828 #8 Sep 08 2022 08:45:44 %S A159828 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, %T A159828 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, %U A159828 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 %N A159828 a(n) is smallest number m > 0 such that m^2 + n^2 + 1 is prime. %C A159828 a(2k-1) is odd, a(2k) is even. %C A159828 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. %H A159828 Harvey P. Dale, <a href="/A159828/b159828.txt">Table of n, a(n) for n = 1..1000</a> %e A159828 n = 1: 1^2 + 1^2 + 1 = 3 is prime, so a(1) = 1. %e A159828 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. %e A159828 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. %t A159828 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 *) %o A159828 (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 %Y A159828 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). %K A159828 easy,nonn %O A159828 1,2 %A A159828 Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 23 2009 %E A159828 Edited and extended by _Klaus Brockhaus_, May 21 2009