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!)
A266927 Perfect powers of the form x^2 + y^2 where x and y are positive integers. 5

%I #25 Jan 11 2016 21:38:09

%S 8,25,32,100,125,128,169,225,289,400,512,625,676,841,900,1000,1156,

%T 1225,1369,1521,1600,1681,2025,2048,2197,2500,2601,2704,2809,3025,

%U 3125,3364,3600,3721,4225,4624,4900,4913,5329,5476,5625,5832,6084,6400,6724,7225,7569

%N Perfect powers of the form x^2 + y^2 where x and y are positive integers.

%C Intersection of A000404 and A001597.

%C A134422 is a subsequence.

%C Obviously, this sequence contains all numbers of the form 2^(2*n+1), for n > 0.

%C Motivation for this sequence is the equation m^k = x^2 + y^2 where m,x,y > 0, k >= 2. - _Altug Alkan_, Jan 11 2016

%H Robert Israel, <a href="/A266927/b266927.txt">Table of n, a(n) for n = 1..10000</a>

%e 25 is a term because 25 = 5^2 = 3^2 + 4^2.

%e 32 is a term because 32 = 2^5 = 4^2 + 4^2.

%e 125 is a term because 125 = 5^3 = 10^2 + 5^2.

%e 169 is a term because 169 = 13^2 = 5^2 + 12^2.

%p N:= 10000: # to get all terms <= N

%p g:= proc(k)

%p local F,F1,F2,F3,f;

%p F:= ifactors(k)[2];

%p F2,F:= selectremove(f->f[1]=2,F);

%p F1,F3:= selectremove(f -> f[1] mod 4 = 1, F);

%p if F1 <> [] then

%p if hastype(map(f -> f[2],F3),odd) then

%p seq(k^j, j=2..floor(log[k](N)),2)

%p else seq(k^j, j=2..floor(log[k](N)))

%p fi

%p elif F2 = [] or F2[1][2]::even or hastype(map(f -> f[2],F3),odd) then NULL

%p else seq(k^j, j=3..floor(log[k](N)),2)

%p fi

%p end proc:

%p sort(convert(map(g,{$2..floor(sqrt(N))}),list)); # _Robert Israel_, Jan 11 2016

%t lim = 7600; fQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[Union@ Flatten@ Table[a^2 + b^2, {a, Floor[Sqrt[lim - 1]]}, {b, a, Floor[Sqrt[lim - a^2]]}], fQ] (* _Michael De Vlieger_, Jan 06 2016, after _N. J. A. Sloane_ and _J. H. Conway_ at A000404 and _Ant King_ at A001597 *)

%o (PARI) is(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, 1e4, if((ispower(n) || n==1) && is(n), print1(n, ", ")));

%Y Cf. A000404, A001597, A004171, A134422.

%K nonn

%O 1,1

%A _Altug Alkan_, Jan 06 2016

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 April 16 12:52 EDT 2024. Contains 371711 sequences. (Running on oeis4.)