%I #17 Apr 17 2018 23:05:40
%S 343,12167,16807,29791,103823,357911,493039,823543,1092727,2048383,
%T 3442951,4657463,6436343,6967871,7880599,11089567,13651919,18191447,
%U 19902511,28629151,30080231,40353607,46268279,49430863,56181887,80062991,84604519,99252847
%N Prime powers p^k (p prime, k > 1) that are not of the form x^2 + y^2 + z^2 where x, y and z are integers.
%C Proper prime powers that are the sum of 4 but no fewer nonzero squares.
%C This sequence lists the numbers of the form A007522(n)^(2*k+1) where n,k > 0.
%C Subsequence of A267321.
%C Terms are 7^3, 23^3, 7^5, 31^3, 47^3, 71^3, 79^3, 7^7, 103^3, 127^3, 151^3, 167^3, 23^5, 191^3, 199^3, ...
%e 16807 is a term because 16807 = 7^5 and there is no integer values of x, y and z for the equation 7^5 = x^2 + y^2 + z^2.
%t nn = 120; Select[TakeWhile[Union@ Flatten@ Map[Prime[Range@ nn]^# &, Range[2, Floor[Log2[PrimePi@ nn]^2]]], # <= Prime[nn]^2 &], ! Resolve[Exists[{x, y, z}, Reduce[# == x^2 + y^2 + z^2, {x, y, z}, Integers]]] &] (* _Michael De Vlieger_, Mar 23 2016 *)
%o (PARI) isA004215(n) = {my(fouri, j) ; fouri=1 ; while(n >=7*fouri, if( n % fouri ==0, j= n/fouri -7 ; if(j % 8==0, return(1)) ; ) ; fouri *= 4 ; ) ; return(0) ; }
%o forcomposite(n=4, 1e7, if(isA004215(n) && isprimepower(n), print1(n, ", ")));
%Y Cf. A000961, A004215, A007522, A267321, A246547.
%K nonn
%O 1,1
%A _Altug Alkan_, Mar 23 2016
|