OFFSET
1,1
COMMENTS
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..176
Z.-W. Sun, On a^n+ bn modulo m, arXiv preprint arXiv:1312.1166 [math.NT], 2013-2014.
EXAMPLE
a(1) = 2 since p(1)^2 + q(1)^2 = 1^2 + 1^2 = 2.
a(2) = 5 since p(1)^2 + q(3)^2 = 1^2 + 2^2 = 5.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
n=0
Do[If[Mod[Prime[m]+1, 4]>0, Do[If[PartitionsP[j]>=Sqrt[Prime[m]], Goto[aa],
If[SQ[Prime[m]-PartitionsP[j]^2]==False, Goto[bb], Do[If[PartitionsQ[k]^2==Prime[m]-PartitionsP[j]^2,
n=n+1; Print[n, " ", Prime[m]]; Goto[aa]]; If[PartitionsQ[k]^2>Prime[m]-PartitionsP[j]^2, Goto[bb]]; Continue, {k, 1, 2*Sqrt[Prime[m]]}]]];
Label[bb]; Continue, {j, 1, Sqrt[Prime[m]]}]];
Label[aa]; Continue, {m, 1, 4475}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Dec 07 2013
STATUS
approved