login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230486 Numbers n such that n^n is representable as the sum of two nonzero squares. 2

%I #33 May 15 2023 12:15:37

%S 5,10,13,17,20,25,26,29,30,34,37,40,41,50,52,53,58,60,61,65,68,70,73,

%T 74,78,80,82,85,89,90,97,100,101,102,104,106,109,110,113,116,120,122,

%U 125,130,136,137,140,145,146,148,149,150,156,157,160,164,169,170

%N Numbers n such that n^n is representable as the sum of two nonzero squares.

%C If n is even, then n must have a prime factor of the form 4k+1. If n is odd, then all prime factors must be of the form 4k+1. - _T. D. Noe_, Oct 21 2013

%C The above is also a sufficient condition: the sequence consists exactly in even multiples of Pythagorean primes A002144, and products of such primes (A008846). - _M. F. Hasler_, Sep 02 2018

%D G. H. Hardy and E. M. Wright, Theory of Numbers, Oxford, Sixth Edition, 2008, p. 395.

%H T. D. Noe, <a href="/A230486/b230486.txt">Table of n, a(n) for n = 1..1000</a>

%F A230486 = { n | A000312(n) is in A000404 } = A004277*A002144 U A008846. - _M. F. Hasler_, Sep 02 2018

%e 5^5 = 55^2 + 10^2.

%e 10^10 = 99712^2 + 7584^2.

%e 13^13 = 17106843^2 + 3198598^2.

%e 17^17 = 28735037644^2 + 1240110271^2.

%t 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 *)

%o (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

%o (Python)

%o from itertools import count, islice

%o from sympy import primefactors

%o def A230486_gen(startvalue=2): # generator of terms >= startvalue

%o 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)))

%o A230486_list = list(islice(A230486_gen(),20)) # _Chai Wah Wu_, May 15 2023

%Y Cf. A000312 (n^n), A004431, A132777.

%Y A subsequence of A000404 (numbers that are the sum of 2 nonzero squares).

%Y Sequence A002144 (primes of the form 4k + 1) and A008846 (products of such primes) are subsequences.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, Oct 20 2013

%E Extended by _T. D. Noe_, Oct 21 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 8 02:35 EDT 2024. Contains 375018 sequences. (Running on oeis4.)