OFFSET
1,1
COMMENTS
It is conjectured that the number of primes of the form x^2+1 is infinite and thus this sequence never becomes a constant, but this has not been proved.
The ratio a(n+2)/a(n) appears to approach 10, as one might expect. - Bill McEachen, Nov 03 2013
REFERENCES
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 17.
P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 190.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Landau's Problems.
MAPLE
f:= proc(n) local t, t0;
if n::even then t0:= 10^(n/2)-1
else
Digits:= n;
t0:= floor(evalf(sqrt(10^n-1)));
while (t0+1)^2+1 <= 10^n do t0:= t0+1 od:
fi;
for t from t0 by -1 do if isprime(t^2+1) then return t fi od
end proc:
map(f, [$1..50]); # Robert Israel, Jan 22 2026
MATHEMATICA
Do[ k = Floor[ Sqrt[ 10^n] - 1]; While[ !PrimeQ[k^2 + 1], k-- ]; Print[k], {n, 1, 25}]
PROG
(PARI) a(n) = my(x=sqrtint(10^n-1)); while (!ispseudoprime(x^2+1), x--); x; \\ Michel Marcus, Jan 23 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Harry J. Smith, May 05 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 08 2003
a(19) corrected by Robert Israel, Jan 22 2026
STATUS
approved
