mersenneforum.org Numbers that can be written in two different ways
 Register FAQ Search Today's Posts Mark Forums Read

 2020-02-24, 13:21 #1 enzocreti   Mar 2018 20F16 Posts Numbers that can be written in two different ways 4, 28 and 508 can be written as (2^n-4) for some n, but also as: (3*s^2+1) for some s Are there other numbers N that can be written as (2^n-4) and as (3*s^2+1)? Last fiddled with by enzocreti on 2020-02-24 at 13:51
 2020-02-24, 13:29 #2 axn     Jun 2003 10010111011012 Posts Don't forget 4
 2020-02-24, 13:56 #3 enzocreti   Mar 2018 17·31 Posts ...primes... 5, 29, 509 are primes such that can be written as 3*n^2+2 and as 2^s-3 for some n and s do you believe they are infinite?
2020-02-24, 17:59   #4
Dylan14

"Dylan"
Mar 2017

7×79 Posts

Quote:
 Originally Posted by enzocreti 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)

 Similar Threads Thread Thread Starter Forum Replies Last Post Godzilla Miscellaneous Math 40 2018-10-17 00:11 Shen Information & Answers 4 2017-01-05 04:49 jasong Homework Help 3 2015-01-30 21:36 science_man_88 Puzzles 9 2010-07-30 21:22 TTn 15k Search 3 2006-01-06 00:08

All times are UTC. The time now is 15:19.

Sat Jan 23 15:19:35 UTC 2021 up 51 days, 11:30, 0 users, load averages: 1.40, 1.83, 2.00