I am puzled about numbers

A

A Evans

Hello I came across an interesting loop in math today
To me its interesting anyway I don't know if it will interest you

var = 999 % 333

print var
var = 9999 % 333
print var
var = 99999 % 333
print var
var = 999999 % 333
print var

var = 9999999 % 333
print var

var = 99999999 % 333
print var

var = 999999999 % 333
print var
and so on

I guess that just goes to show nine is a universal number
or am I just completely insane and everyone knows this already
 
B

Bengt Richter

Hello I came across an interesting loop in math today
To me its interesting anyway I don't know if it will interest you

var = 999 % 333

print var

var = 9999 % 333
print var

var = 99999 % 333
print var

var = 999999 % 333
print var


var = 9999999 % 333
print var


var = 99999999 % 333
print var


var = 999999999 % 333
print var

and so on

I guess that just goes to show nine is a universal number
or am I just completely insane and everyone knows this already
... for digits in xrange(1,10):
... num = eval(digit*digits)
... mod = eval(digit*3)
... var = num % mod
... print '%s: %s %% %s => %s' % (digits, num, mod, var)
...
1: 9 % 999 => 9
2: 99 % 999 => 99
3: 999 % 999 => 0
4: 9999 % 999 => 9
5: 99999 % 999 => 99
6: 999999 % 999 => 0
7: 9999999 % 999 => 9
8: 99999999 % 999 => 99
9: 999999999 % 999 => 0
1: 7 % 777 => 7
2: 77 % 777 => 77
3: 777 % 777 => 0
4: 7777 % 777 => 7
5: 77777 % 777 => 77
6: 777777 % 777 => 0
7: 7777777 % 777 => 7
8: 77777777 % 777 => 77
9: 777777777 % 777 => 0

Careful not to jump to conclusions ;-)

Regards,
Bengt Richter
 
P

Peter Hansen

Bengt said:
Hello I came across an interesting loop in math today
To me its interesting anyway I don't know if it will interest you [snip]
I guess that just goes to show nine is a universal number
or am I just completely insane and everyone knows this already

1: 7 % 777 => 7
2: 77 % 777 => 77
3: 777 % 777 => 0
4: 7777 % 777 => 7
5: 77777 % 777 => 77
6: 777777 % 777 => 0
7: 7777777 % 777 => 7
8: 77777777 % 777 => 77
9: 777777777 % 777 => 0

Careful not to jump to conclusions ;-)

So what? Everyone knows that 7 is also a universal number! ;-)

-Peter
 
A

A Evans

Here I cam across another interesting pattern or am I thinking to close to
binary

P.S thanks for the replies

which brings me to another question seeing these patterns I am making with
numbers how random is the random function in python I mean is it really
possible for a computer to think randomly or is it a pattern like this

var = 999999 % 333
print var

var = 888888 % 222
print var

var = 777777 % 111
print var

var = 666666 % 333
print var

var = 555555 % 222
print var

var = 444444 % 111
print var

var = 333333 % 333
print var

var = 222222 % 222
print var

var = 111111 % 111
print var

var = 99999 % 333
print var

var = 88888 % 222
print var

var = 77777 % 111
print var

var = 66666 % 333
print var

var = 55555 % 222
print var

var = 44444 % 111
print var

var = 33333 % 333
print var

var = 22222 % 222
print var

var = 11111 % 111
print var


var = 9999 % 333
print var

var = 8888 % 222
print var

var = 7777 % 111
print var

var = 6666 % 333
print var

var = 5555 % 222
print var

var = 4444 % 111
print var

var = 3333 % 333
print var

var = 2222 % 222
print var

var = 1111 % 111
print var




var = 999 % 333
print var

var = 888 % 222
print var

var = 777 % 111
print var

var = 666 % 333
print var

var = 555 % 222
print var

var = 444 % 111
print var

var = 333 % 333
print var

var = 222 % 222
print var

var = 111 % 111
print var

var = 99 % 333
print var

var = 88 % 222
print var

var = 77 % 111
print var

var = 66 % 333
print var

var = 55 % 222
print var

var = 44 % 111
print var

var = 33 % 333
print var

var = 22 % 222
print var

var = 11 % 111
print var






var = 9 % 333
print var

var = 8 % 222
print var

var = 7 % 111
print var

var = 6 % 333
print var

var = 5 % 222
print var

var = 4 % 111
print var

var = 3 % 333
print var

var = 2 % 222
print var

var = 1 % 111
print var
 
P

Peter Hansen

A said:
which brings me to another question seeing these patterns I am making with
numbers how random is the random function in python I mean is it really
possible for a computer to think randomly or is it a pattern like this

Google can help with such questions, and it's a very good idea to get
in the habit of checking there first when faced with a question like
this about computers. Using the search "all about random numbers"
I quickly found this:

http://www.krellinst.org/UCES/archive/modules/monte/node1.html

There are dozens and dozens of other such pages.

-Peter
 
A

A Evans

Hey Sorry about that I will remember to search google next time before
asking questions on the forum

Thanks for the link

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,184
Messages
2,570,978
Members
47,561
Latest member
gjsign

Latest Threads

Top