News for hackers. Stuff that matters.
Re:Using prime numbers to make better backgrounds by nadam on Thursday April 07, 2011 @10:30AM (#2419576)
Cool, but these numbers don't have to be primes. They just have to be coprimes (like (8,9)).

The least common multiple of two coprimes 'a' and 'b' is a*b.

http://en.wikipedia.org/wiki/Coprime

Re:Using prime numbers to make better backgrounds by dmvaldman on Thursday April 07, 2011 @12:45PM (#2420147)
Not for the cicada example, but yes for the web aspect.

In the cicada example the point is that one predator would evolve to align its boom cycle so that it had a common divisor with the cycle of the cicada.

Since the predator's cycle is variable, it is evolutionarily optimal if the cicada only comes out every prime number of years.

Re:Using prime numbers to make better backgrounds by mryall on Thursday April 07, 2011 @06:11PM (#2421424)
Why can't the predators evolve to have the same cycle as the cicadas, with a prime number of years?
Re:Using prime numbers to make better backgrounds by redthrowaway on Thursday April 07, 2011 @06:20PM (#2421458)
They can, but by being so highly variable, the cicada boom cycle becomes a less important survival driver than other factors, such as predator cycles, weather, etc. In a closely-paired ecosystem, with relatively few variables, you do see remarkable coevolution between predators and prey. When the prey removes their boom cycle from the dominant evolutionary stressors on the predator, differential survival of the predator will be determined far more by the dominant factors.

It's important to note that, for the cicada, they are not a staple diet but rather an opportunistic one that occurs only once in a few generations. This means that the predator's cycle would have to skip generations in order to be effective. This is unlikely, given that that cycle would have no evolutionary advantage in the intermediary, and would thus be diluted by more pressing concerns.

Re:Using prime numbers to make better backgrounds by endtime on Friday April 08, 2011 @01:54PM (#2424905)
Coprimality is still the relevant property. But if one number can be adjusted, then the only way to guarantee coprimality is for the other number to be a prime.
Re:Using prime numbers to make better backgrounds by wging on Friday April 08, 2011 @03:18PM (#2425234)
Almost. Coprimality can never be guaranteed. If the numbers are p and q, with p prime and q being adjustable, just take q=p. Then they match up, showing that this barrier isn't enough.

The other relevant barrier we have is probably that a 6-year wasp has difficulty stretching its cycle by a factor of 3--much more difficult than a single year or two.

Re:Using prime numbers to make better backgrounds by dangoldin on Friday April 08, 2011 @12:32AM (#2422469)
It's interesting that the cicadas have the cycles they do. Why not also go 23, 29, etc? There's obviously a trade off between being more frequent but also encountering more predators - I'm just curious why they settled on the cycles that they did.
Re:Using prime numbers to make better backgrounds by parfe on Friday April 08, 2011 @11:48AM (#2424285)
They only mate once before dying. I assume waiting 29 years would increase the odds of a pre-mating death. Maybe even death from old age. How long can an insect live?
Re:Using prime numbers to make better backgrounds by baddox on Thursday April 07, 2011 @11:51AM (#2419919)
Indeed. If you already have one tile that's, say 50px wide, you can easily find coprime sizes:

http://www.wolframalpha.com/input/?i=coprime+to+50