DaveC426913
Valued Senior Member
Brilliant!Made a quick app in Python.
I happen to have Python installed. Maybe I'll run some submission requests from Michael345.
Brilliant!Made a quick app in Python.
Code said:X = input("Enter a seed number X: ")
seednumX = int(X)
steps = 0
evensteps = 0
oddsteps = 0
Xhi = 0
while X != 1:
if (int(X) % 2) == 0:
X = int(X) / 2
if int(X) > int(Xhi):
Xhi = int(X)
print(int(X))
evensteps += 1
steps += 1
else:
X = 3 * int(X) + 1
if int(X) > int(Xhi):
Xhi = int(X)
print(int(X))
oddsteps += 1
steps += 1
print("Seed Number X = " + str(seednumX) + " | X Seed Length = " + str(len(str(seednumX))))
print("X Highest = " + str(Xhi) + " | X Highest Length = " + str(len(str(Xhi))))
print("Even Steps = " + str(evensteps))
print("Odd Steps = " + str(oddsteps))
print("Total Steps = " + str(steps))
Cool. Bonus marks if you can plot the output as a graph!Some upgrades v1.1
While I'm learning Python
Output:
Enter a seed number X: 9663
28990
14495
...
9038141
27114424
13557212
6778606
...
4
2
1
Seed Number X = 9663 | X Seed Length = 4
X Highest = 27114424 | X Highest Length = 8
Even Steps = 118
Odd Steps = 66
Total Steps = 184
This seems unlikely, because it would make sense to first publish any such proof in a peer-reviewed journal, rather than on an internet forum like this one.
The paper is dated only five weeks ago.If anyone is interested in a solution to this 'recreational math' problem, here is a pdf.
This is an opinion. Hard to claim what others are thinking without telepathy.Peer reviewed journals are typically biased, assuming only people associated with eduational or scientific organizations are capable of critical thinking.
The paper has been revised a few times over the years, to make it comprehensible for the average reader with basic math skills, and correcting errors.The paper is dated only five weeks ago.
Are we expected to accept that this is has been reviewed and accepted as a formal proof?
This is an opinion. Hard to claim what others are thinking without telepathy.
Still, regardless of whether the opinion is warranted, it's not justification for not submitting one's work to a peer-review, since a review would certainly be capable of finding errors if there were some.
Not submitting one's work to a peer review process is - at the very least - a tacit admission that the paper probably has holes in it big enough for one's peers to find (otherwise, what's the harm?).
Code v1.3 said:X = input("Enter a seed number X: ")
seednumX = int(X)
steps = 0
evensteps = 0
consecutiveevensteps = 0
consecutiveevenstepstring = ""
consecutivestepseven = False
oddsteps = 0
consecutiveoddsteps = 0
consecutiveoddstepstring = ""
consecutivestepsodd = False
Xhi = 0
while X != 1:
if (int(str(int(X))[-1]) % 2) == 0:
X = int(X) / 2
if int(consecutiveoddsteps) > 1:
consecutiveoddstepstring = consecutiveoddstepstring + str(consecutiveoddsteps) + ", "
consecutivestepsodd = False
consecutiveoddsteps = 0
if consecutivestepseven == True:
consecutiveevensteps += 1
else:
consecutivestepseven = True
consecutiveevensteps += 1
if int(X) > int(Xhi):
Xhi = int(X)
if (int(str(int(X))[-1]) % 2) == 0:
print(str(int(X)) + " EVEN")
else:
print(str(int(X)) + " ODD")
evensteps += 1
steps += 1
else:
X = 3 * int(X) + 1
if int(consecutiveevensteps) > 1:
consecutiveevenstepstring = consecutiveevenstepstring + str(consecutiveevensteps) + ", "
consecutivestepseven = False
consecutiveevensteps = 0
if consecutivestepsodd == True:
consecutiveoddsteps += 1
else:
consecutivestepsodd = True
consecutiveoddsteps += 1
oddsteps += 1
if int(X) > int(Xhi):
Xhi = int(X)
if (int(str(int(X))[-1]) % 2) == 0:
print(str(int(X)) + " EVEN")
else:
print(str(int(X)) + " ODD")
steps += 1
if int(consecutiveevensteps) > 1:
consecutiveevenstepstring = consecutiveevenstepstring + str(consecutiveevensteps)
if int(consecutiveoddsteps) > 1:
consecutiveoddstepstring = consecutiveoddstepstring + str(consecutiveoddsteps)
print("Seed Number X = " + str(seednumX) + " | X Seed Length = " + str(len(str(seednumX))))
print("X Highest = " + str(Xhi) + " | X Highest Length = " + str(len(str(Xhi))))
print("Even Steps = " + str(evensteps))
print("Odd Steps = " + str(oddsteps))
print("Total Steps = " + str(steps))
print("Consecutive Even Steps = " + str(consecutiveevenstepstring))
print("Consecutive Odd Steps = " + str(consecutiveoddstepstring))
There is never any consecutive odd steps. Because as soon as X is odd then you times by 3, X always becomes odd again, then when you add 1 you make it even... ?
Seed Number X = 6325874123658987 ... 88745566321456987 | X Seed Length = 206
X Highest = 1897762237097 ... 36698964370962 | X Highest Length = 207
Even Steps = 928
Odd Steps = 154
Total Steps = 1082
Consecutive Even Steps = 634, 6, 2, 5, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 4, 2, 2, 4, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 5, 2, 2, 3, 5, 2, 4, 3, 4, 2, 2, 4, 2, 3, 2, 2, 2, 4, 2, 2, 2, 3, 5, 5, 2, 2, 7, 2, 3, 2, 2, 6, 2, 2, 6, 3, 3, 3, 3, 4, 3, 2, 3, 4
Consecutive Odd Steps =
Not sure why when I enter very long numbers its always starts with a high amount of consecutive even steps? the longer the X number length the greater the first even consecutive steps value. Maybe a limitation to handling large numbers?
Not sure whether it is interesting or just a technical limitation in calculating long numbers.Interesting.
It's working with natural integer numbers so to change it to use decimals is too much effortJust for fun, try multiplying the odd numbers by 1.5 and then adding 0.5.
Talking about long numberscalculating long numbers.