Jump to content

Random number pattern?


slpctrl

Recommended Posts

Is it possible to, using PHP, take an array of 3 or 4 digit numbers, and find some sort of real pattern in the numbers? I've been working on trying to get something semi reliable in finding a pattern in random 3 or 4 digit numbers, but can't seem to really get anything that seems remotely like any pattern. Any help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/80529-random-number-pattern/
Share on other sites

a pattern can really forced on to any set of integers so you can't say that exactly

you could look at common series of numbers and then see if it matches one of those, but lets say I have

{1,25,100,289}

 

the pattern there is

n^2 for a1

((n*n)+(An-1))^2 for a >1

 

 

See the problem?

Link to comment
https://forums.phpfreaks.com/topic/80529-random-number-pattern/#findComment-408313
Share on other sites

I've been working on trying to get something semi reliable in finding a pattern in random 3 or 4 digit numbers

 

Surely, by definition, random numbers have no pattern? Im not sure what you're asking us to help you do. Perhaps if you provide some examples we might be able to help a bit more.

Link to comment
https://forums.phpfreaks.com/topic/80529-random-number-pattern/#findComment-408343
Share on other sites

You could also say that all random numbers have a pattern, if you allow arbitrarily complex patterns.  For example, the pattern for 364,255,927,584 could be "364,255,927,584".  So what counts as a pattern needs to be defined.

 

For example, you may be looking for patterns where the numbers increase according to some simple rule (as in cooldude's example).

Link to comment
https://forums.phpfreaks.com/topic/80529-random-number-pattern/#findComment-408403
Share on other sites

By definition they wouldn't but computer generated random numbers sure do.

 

I've been working on trying to get something semi reliable in finding a pattern in random 3 or 4 digit numbers

 

Surely, by definition, random numbers have no pattern? Im not sure what you're asking us to help you do. Perhaps if you provide some examples we might be able to help a bit more.

Link to comment
https://forums.phpfreaks.com/topic/80529-random-number-pattern/#findComment-408491
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.