View Single Post
Old 2020-02-24, 17:59   #4
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

5×109 Posts
Default

Quote:
Originally Posted by enzocreti View Post
Are there other numbers N that can be written as (2^n-4) and as (3*s^2+1)?
Quick piece of Mathematica code to test this:
Code:
For[n = 1, n <= 10000, n++, 
 If[IntegerQ[Sqrt[1/3*(2^n - 5)]], Print[n, " ", 2^n - 4]]]
This is equivalent since
Code:
2^n-4=3s^2+1
2^n-5=3s^2
s^2=1/3*(2^n-5)
s = sqrt(1/3*(2^n-5))
Up to n = 20000 there are 3 n's such that 2^n-4 = 3s^2+1 for some integer s:
Code:
3 (corresponding to 4)
5 (28)
9 (508)
Dylan14 is offline   Reply With Quote