%I #22 Dec 27 2018 05:40:26
%S 3,2,3,1,1,6,1,2,1,2,1,3,1,2,1,1,1,1,1,2,2,1,3,2,1,1,1,1,3,2,1,2,1,1,
%T 1,1,1,2,1,1,1,1,2,1,1,1,2,1,1,2,1,1,1,3,1,1,1,1,2,1,1,1,1,2,1,1,1,1,
%U 1,3,2,1,1,1,1,1,1,2,2,1,1,1,2,2,1,2,2
%N Number of solutions (x,y,z) to the Diophantine equation 2^x + p^y = z^2 where p = prime(n).
%C These numbers were obtained experimentally using Maple with p = 3,5,...,prime(1000)=7919 and x, y = 0,1,2,...,30. We find x,y <= 23.
%C p > 2 because for p = 2 the number of solutions is infinite.
%C The trivial solution (x,y,z) = (3,0,3) exists for all prime p.
%C The following table gives the first values (p, x, y, z)
%C +----+-----+----+-----+
%C | p | x | y | z |
%C +----+-----+----+-----+
%C | 3 | 0 | 1 | 2 |
%C | 3 | 3 | 0 | 3 |
%C | 3 | 4 | 2 | 5 |
%C | 5 | 2 | 1 | 3 |
%C | 5 | 3 | 0 | 3 |
%C | 7 | 1 | 1 | 3 |
%C | 7 | 1 | 1 | 3 |
%C | 7 | 5 | 2 | 9 |
%C | 11 | 3 | 0 | 3 |
%C .......................
%C The maximum x should be at least 30 because of the identity 2^30 + (2^16+1)^1 = (2^15+1)^2 involving the conjectured greatest prime Fermat number 2^16+1 = 65537. - _Jean-François Alcover_, Jan 24 2014
%H D. Acu, <a href="http://www.emis.de/journals/GM/vol15nr4/acu/acu.pdf">On a diophantine equation 2^x + 5^y = z^2</a>, General Mathematics Vol. 15, N° 4 (2007), 145-148.
%H A. Suvarnamani, A. Singta, S. Chotchaisthit, <a href="http://www.sci.rmutt.ac.th/stj/index.php/Volume7/article/view/9/5">On two diophantine equations 4^x + 7^y = z^2 and 4^x + 11^y = z^2</a>, Science and Technology RMUTT Journal, Volume 1 (2011), Number 1 : pp. 25 - 28.
%p with(numtheory):nn:= 30:for n from 2 to 90 do:c:=0:p:=ithprime(n):for x from 0 to nn do:for y from 0 to nn do:z:=sqrt(2^x+p^y): if z=floor(z)then c:=c+1:else fi:od:od: printf(`%d, `,c):od:
%t xm = 30; f[n_] := With[{p = Prime[n]}, Table[Table[{x, y, Sqrt[2^x + p^y]}, {y, 0, Log[p, Max[1, 2^xm - 2^x]]}], {x, 0, Log[2, 2^xm]}] // Flatten[#, 1]& // Union]; sol[n_] := Select[f[n], IntegerQ[# // Last]&]; a[n_] := sol[n] // Length; Table[a[n], {n, 2, 100}] (* _Jean-François Alcover_, Jan 24 2014 *)
%K nonn
%O 2,1
%A _Michel Lagneau_, Jan 20 2014