OFFSET
1,1
COMMENTS
Sequence A230486 lists those N such that N^N is the sum of two nonzero squares. Here we list the smallest x which yields such a solution x^2 + y^2 = N^N, thus necessarily y >= x.
EXAMPLE
See Examples in A230486.
PROG
(PARI) for( n=1, 199, if( t=sum2sqr(n^n), t[1][0]||(t=t[^1])||next; print1(t[1][1]", "))) \\ See A133388 for sum2sqr().
(Python)
from itertools import count, islice
from sympy import primefactors
from sympy.solvers.diophantine.diophantine import diop_DN
def A304437_gen(startvalue=2): # generator of terms
return map(lambda n:min(min(a, b) for a, b in diop_DN(-1, n**n) if a>0 and b>0), filter(lambda n:all(p&3==1 for p in primefactors(n)) if n&1 else any(p&3==1 for p in primefactors(n)), count(max(startvalue, 2))))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler (following an idea from Jacques Tramu), Sep 02 2018
STATUS
approved