OFFSET
1,1
COMMENTS
Note that the sequence contains all primes of the form n^2 + 1 with n > 1. A conjecture of Landau states that there are infinitely many primes of the form n^2 + 1.
Conjecture: For any prime p > 5 of the form x^2 + y^2 (0 < x < y), there is a prime q not equal to p of the form u^2 + v^2 (0 < u < v) with u + v = x + y.
A subsequence of A002313. - Altug Alkan, Dec 18 2015
Conjecture: each odd number m > 1 is a unique sum m = x + y with 0 < x < y, where x^2 + y^2 is in the sequence. - Thomas Ordowski, Jan 16 2017
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..3500
EXAMPLE
a(1) = 5 since 5 = 1^2 + 2^2 is a prime with 0 < 1 < 2, and 0^2 + 3^2 = 9 is composite.
a(4) = 53 since 53 = 2^2 + 7^2 is a prime with 0 < 2 < 7, and 0^2 + 9^2 = 81 and 1^2 + 8^2 = 65 are both composite.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Y[n_]:=Y[n]=Sum[If[SQ[n-4*y^2], 2y, 0], {y, 0, Sqrt[n/4]}]
X[n_]:=X[n]=Sqrt[n-Y[n]^2]
p[n_]:=p[n]=Prime[n]
x[n_]:=x[n]=X[p[n]]
y[n_]:=y[n]=Y[p[n]]
n=0; Do[If[Mod[p[k]-1, 4]==0, Do[If[PrimeQ[a^2+(x[k]+y[k]-a)^2], Goto[aa]], {a, 0, Min[x[k], y[k]]-1}]; n=n+1; Print[n, " ", p[k]]]; Label[aa]; Continue, {k, 2, 1669}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 28 2015
STATUS
approved