%N Odd numbers n such that 3^n+1 is a sum of two squares.
%C Keenan Curtis found the values up though 577 in his undergraduate thesis (working with Jeremy Rouse at Wake Forest University). Keenan proved that if 3^n+1 is a sum of two squares for n odd, then n must be equivalent to 1 mod 4, that n itself is a sum of two squares, and that 3^p+1 is a sum of two squares for all primes p dividing n.
%D Keenan Curtis, "Sums of Two Squares: An Analysis of Numbers of the form 2^n+1 and 3^n+1", submitted to INVOLVE.
%H Greg Dresden, Kylie Hess, Saimon Islam, Jeremy Rouse, Aaron Schmitt, Emily Stamm, Terrin Warren, Pan Yue, <a href="https://arxiv.org/abs/1609.04391">When is a^n+1 the sum of two squares?</a>, arXiv:1609.04391 [math.NT], 2016. See p. 20.
%H S. S. Wagstaff, Jr., <a href="http://www.cerias.purdue.edu/homes/ssw/cun/index.html">The Cunningham Project</a>
%e 3^1+1 = 4 = 0^2 + 2^2, so 1 is a term;
%e 3^5+1 = 244 = 10^2 + 12^2, so 5 is a term;
%e 3^13+1 = 1594324 = 82^2 + 1260^2, so 13 is a term.
%Y Intersection of A000404 and A034472.
%A _Greg Dresden_, Apr 19 2016
%E a(12) = 761 added from the Cunningham Project via _Greg Dresden_, Jul 23 2016