A230486 Numbers n such that n^n is representable as the sum of two nonzero squares.
5, 10, 13, 17, 20, 25, 26, 29, 30, 34, 37, 40, 41, 50, 52, 53, 58, 60, 61, 65, 68, 70, 73, 74, 78, 80, 82, 85, 89, 90, 97, 100, 101, 102, 104, 106, 109, 110, 113, 116, 120, 122, 125, 130, 136, 137, 140, 145, 146, 148, 149, 150, 156, 157, 160, 164, 169, 170
Offset: 1
Keywords
Examples
5^5 = 55^2 + 10^2. 10^10 = 99712^2 + 7584^2. 13^13 = 17106843^2 + 3198598^2. 17^17 = 28735037644^2 + 1240110271^2.
References
- G. H. Hardy and E. M. Wright, Theory of Numbers, Oxford, Sixth Edition, 2008, p. 395.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Mathematica
t = {}; Do[f = FactorInteger[n]; p = Transpose[f][[1]]; If[EvenQ[n], If[MemberQ[Mod[p, 4], 1], AppendTo[t, n]], If[Union[Mod[p, 4]] == {1}, AppendTo[t, n]]], {n, 2, 200}]; t (* T. D. Noe, Oct 21 2013 *)
-
PARI
select( is_A230486(n)={(n=factor(n)[,1]%4) && if(n[1]==2, Set(n)[1]==1, Set(n)==[1])}, [1..200]) \\ M. F. Hasler, Sep 02 2018
-
Python
from itertools import count, islice from sympy import primefactors def A230486_gen(startvalue=2): # generator of terms >= startvalue return 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))) A230486_list = list(islice(A230486_gen(),20)) # Chai Wah Wu, May 15 2023
Formula
Extensions
Extended by T. D. Noe, Oct 21 2013
Comments