%I #23 Mar 15 2016 00:10:13
%S 30,60,70,78,102,110,120,140,150,156,174,182,190,204,210,220,222,230,
%T 238,240,246,270,280,286,300,310,312,318,330,348,350,364,366,374,380,
%U 390,406,408,420,430,438,440,444,460,470,476,480,492,494,510,518,534,540,546,550,560
%N Integers n such that n^n is the sum of two nonzero squares while n is not.
%C Terms that are not divisible by 10 are 78, 102, 156, 174, 182, 204, 222, 238, 246, 286, 312, 318, 348, 364, 366, 374, 406, 408, 438, 444, 476, 492, 494, 518, 534, 546, 572, 574, 582, 598, 606, 624, 636, 638, 646, 654, 678, 696, 728, ...
%C If k^2 is the sum of 2 nonzero squares, (2*k)^(2*k) is. (2*k)^(2*k) = 2^(2*k) * k^(2*k) = (2^k)^2 * k^2 * k^(2*k-2) = (2^k)^2 * k^2 * (k^(k-1))^2. So if k^2 = a^2 + b^2, then (2*k)^(2*k) = (k^(k-1)*2^k*a)^2 + (k^(k-1)*2^k*b)^2. And if k^2 = a^2 + b^2 and k is not the sum of 2 nonzero squares, 2*k is not the sum of 2 nonzero squares. So 2 * A162592(n) appears in this sequence. Note that all terms appear as even numbers.
%H Chai Wah Wu, <a href="/A267967/b267967.txt">Table of n, a(n) for n = 1..10000</a>
%e 30 is a term because 30 is not the sum of 2 nonzero squares and 30^30 = 8609344200000000000000^2 + 11479125600000000000000^2.
%t Select[Range@ 120, SquaresR[2, #] == 0 && Resolve[Exists[{a, b}, Reduce[#^# == (a^2 + b^2), {a, b}, Integers], a > b > 0]] &] (* _Michael De Vlieger_, Jan 24 2016 *)
%o (PARI) isA000404(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2));}
%o for(n=1, 1e3, if(isA000404(n^n) && !isA000404(n), print1(n, ", ")));
%Y Cf. A000312, A000404, A018825, A162592.
%K nonn
%O 1,1
%A _Altug Alkan_, Jan 22 2016