Jump to content
Science Forums

A Truly Worthwhile Challenge.


Recommended Posts

i wanted to apologize for my previous post, it was hasty and bad form.

anyway here's my newest aproach.

snip...

this takes 4 seconds to run, making it my fastest program yet. the obvious downside is that it can't be extended to larger values as the array is limited in size. or can it? here's my idea. calculate intermediate values and store them in an array, clearing the array once in a while. so here's what i would need from you guys. (for some reason i can't think striaght right now.) say i go to 100, then for each rank i want the next number above 100. what would be the formula for that, in terms if row, column and inc?

for example, 102 would be the next figurate rank 3 row 6 column 3, 106 would be the next figurate rank 4 row 10 column 6, 105 would be the next figurate rank 5 row 15 column 10, etc.

 

i understood it just fine. in short, there is no formula (known). i have taken my list table of figurate numbers that i earlier attached for you and added some indicators for clarification. the red line bounds all values less than 100, the green line bounds all values less than 200. notice they don't match. :clue: draw in as many bounds as you like, but they will just get longer & more convoluted and they won't match. :painting: no formula, no expression, no shortcut. in my humble opinion of course. :turtle:

 

Edit: i edited the table and added the bounds for <300=Yellow:<400=Blue:<500=magenta

Link to comment
Share on other sites

the obvious downside is that it can't be extended to larger values as the array is limited in size.

 

I don't think arrays in python have a size limit. Are you getting an out of memory error?

 

Also, I'm curious, how big can you make an array, array = list(range(1,max,1)), without doing anything to it? If you can make it large, ~ max = 10**13, then I would have a solution I think.

 

~modest

Link to comment
Share on other sites

i don't think arrays in python have a size limit. Are you getting an out of memory error?

 

Also, I'm curious, how big can you make an array, array = list(range(1,max,1)), without doing anything to it? If you can make it large, ~ max = 10**13, then I would have a solution I think.

 

~modest

they do have a size limit. on a 32 bit machine, an array is limited to 2^(32-3) elements (roughly 537 million). 64 bit machines python allows pretty much up to however muc hyour system can handle in ram. (up to 2^(64-3) or 2.3*10^18)

Link to comment
Share on other sites

okay here is my code; i need some help with it:

import time, math
t0 = time.time()
finish = 10**3+1
max = 10**2
current = max+1
row = 10
column = 6
inc = 4
total = 0
array = list(range(6,max,3))
check = False
file = open("numbers.txt","w")
while column+inc < finish:
if column+inc > current:
	array.sort()
	total += 1
	file.write(str(total)+" "+str(array[0]) +"\n")
	for i in range(1,len(array)):
		if array[i] != array[i-1]:
			total += 1
			file.write(str(total)+" "+str(array[i]) +"\n")
	array = list(range(3*(int(current/3)+1),current+max,3))
	current += max
	column = 6
	inc = 4
	row = column*int((current-max-(column+inc))/column +1)+column+inc
	check = True
else:
	if check:
		array += list(range(row,current,column))
		column += inc
		inc += 1
		row = column*int((current-max-(column+inc))/column +1)+column+inc
		if inc %3 == 0:
			column += inc
			inc += 1
			row = column*int((current-max-(column+inc))/column +1)+column+inc
	else:
		array += list(range(row,current,column))
		column = row
		inc += 1
		row += inc
		if inc%3 == 0:
			column = row
			inc += 1
			row += inc
array.sort()
total +=1
file.write(str(total)+" "+str(array[0]) +"\n")
for i in range(1,len(array)):
if array[i] != array[i-1]:
	total += 1
	file.write(str(total)+" "+str(array[i]) +"\n")
t0 =time.time()-t0
print(total,t0)

i am missing 3 values, 201, 301, and 501. not sure why.

Link to comment
Share on other sites

When you get to [math]\varpi(10^{12})[/math], can you start posting your

results in increments of one hundred billion as follows:

 

_______[math]x[/math]______________________[math]\varpi(x)[/math]_____________

 

1,000,000,000,000________________?_________________

1,100,000,000,000________________?_________________

1,200,000,000,000________________?_________________

1,300,000,000,000________________?_________________

 

and so on?

 

Meanwhile, I will calculate the expected values based on the

lower and upper bounds of the fine structure constant and the

proton to electron mass ratio, given by Wikipedia as follows:

 

[math]137.035999135^{-1}[/math] to [math]137.035999033^{-1}[/math]

 

[math]1836.15267167[/math] to [math]1836.15267327[/math]

 

That way, we will be able to see new results on a daily basis!

 

Exellent work!!!

 

Don.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...