OFFSET
1,1
COMMENTS
a(n) is a subset of A085317(n) = {3, 11, 17, 19, 29, 41, 43, 53, 59, 61, 67, 73, 83, ...} Primes of form x^2 + y^2 + z^2. All terms except a(1) = 17 are congruent to 3 mod 8.
If neither p, q, nor r is 3, then p^2 + q^2 + r^2 is always divisible by 3. Therefore all terms in a(n) have at least one 3^2 in their summation. - Richard R. Forberg, Aug 29 2013
EXAMPLE
a(1) = 17 because 17 = 2^2 + 2^2 + 3^2 is prime and 2^2 + 2^2 + 2^2 = 12 is composite.
MATHEMATICA
With[{nn=50}, Take[Union[Select[Total/@Tuples[Prime[Range[nn/2]]^2, 3], PrimeQ]], nn]] (* Harvey P. Dale, Aug 26 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Nov 14 2006
STATUS
approved