OFFSET
1,1
COMMENTS
All terms are congruent to 5 modulo 6. Smallest of primes p, q, r is always 3. - Zak Seidov, Jun 03 2014
The number of such representations of a prime of that form is A263723. - Jonathan Sondow and Robert G. Wilson v, Nov 02 2015
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
5099 = 3^2 + 7^2 + 71^2.
MATHEMATICA
mx = 20; ps = Prime[Range[2, mx + 1]]; t = Table[ps[[i]]^2 + ps[[j]]^2 + ps[[k]]^2, {i, mx}, {j, i + 1, mx}, {k, j + 1, mx}]; Select[Union[Flatten[t]], # <= 34 + ps[[-1]]^2 && PrimeQ[#] &] (* T. D. Noe, May 01 2012 *)
PROG
(PARI) list(lim)=my(v=List(), t); lim\=1; forprime(p=7, sqrt(lim), forprime(q=5, min(sqrtint(lim-p^2-9), p-1), t=p^2+q^2; forprime(r=3, min(sqrtint(lim-t), q-1), if(isprime(t+r^2), listput(v, t+r^2))))); vecsort(Vec(v), , 8)
\\ Charles R Greathouse IV, May 01 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 01 2012
STATUS
approved