A270820 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.
343, 12167, 16807, 29791, 103823, 357911, 493039, 823543, 1092727, 2048383, 3442951, 4657463, 6436343, 6967871, 7880599, 11089567, 13651919, 18191447, 19902511, 28629151, 30080231, 40353607, 46268279, 49430863, 56181887, 80062991, 84604519, 99252847
Offset: 1
Keywords
Examples
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.
Programs
-
Mathematica
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 *)
-
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) ; } forcomposite(n=4, 1e7, if(isA004215(n) && isprimepower(n), print1(n, ", ")));
Comments