User alix axel - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-23T11:57:28Z http://mathoverflow.net/feeds/user/2649 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/9181/pascal-triangle-and-prime-numbers Pascal Triangle and Prime Numbers Alix Axel 2009-12-17T16:37:23Z 2010-05-14T18:03:08Z <p>My <a href="http://stackoverflow.com/questions/1922846/pascal-triangle-and-prime-numbers" rel="nofollow">question @ StackOverflow</a> just got closed as not programing related so I'm posting here.</p> <p>Please refer to the question @ SO, since:</p> <ul> <li>sorry, new users can only post a maximum of one hyperlink</li> <li>sorry, new users aren't allowed to use image tags</li> </ul> <p>[Edited to include enough links and images by GJK.]</p> <p><hr /></p> <p>Back in the days when I was in high-school I developed a big interest about number theory specifically prime numbers and prefect numbers, I used to stay awake all night long with a bunch of sketch papers trying to come up with a formula to generate / test prime numbers. I discovered a lot of things by my own like $p(p + 1)/2$ is a perfect number when p is a <a href="http://en.wikipedia.org/wiki/Mersenne%5Fprime" rel="nofollow">Mersenne prime</a>.</p> <p>I was so obsessed back then that I used to make mental calculations when I was asleep, I remember one day waking up really excited because I had discovered that $2^p - 2 = 0 \pmod p$ when $p$ is a prime, only to discover a few weeks later that Pierre de Fermat had <a href="http://en.wikipedia.org/wiki/Fermat%5Fprimality%5Ftest" rel="nofollow">a similar idea</a> but, unfortunately it didn't work for <a href="http://en.wikipedia.org/wiki/Pseudoprime" rel="nofollow">pseudoprimes</a>. I was very disappointed back then and I started playing with the <a href="http://en.wikipedia.org/wiki/Pascal%5Ftriangle" rel="nofollow">Pascal triangle</a>.</p> <p>Blaise Pascal, Marin Mersenne and Pierre de Fermat were contemporaneous and shared thoughts with letters, in fact if you think a bit both the Mersenne prime formula and the Fermat primality test seem to be closely related with the rows of the Pascal triangle (the sum of all numbers in row $n$ is $2^n$ where the first and last numbers are $1$, hence the $-1$ in the Mersenne formula and $-1$ or $-2$ in the primality tests).</p> <p>I coded a Pascal Triangle generator with PHP and HTML that highlighted all the numbers that were multiples of a specific number and the results amazed me, and until this day I don't know why this happens and I would very much like to know why. Instead of trying to explain, I'll post here the images.</p> <p><strong>Composite Example:</strong></p> <p><img src="http://i48.tinypic.com/23jsnyq.jpg" alt="multiples of 6" /></p> <p><strong>Prime Example:</strong></p> <p><img src="http://i50.tinypic.com/xp0due.jpg" alt="multiples of 2" /></p> <p>I think the difference [between the prime and composite cases] is obvious, but if you're confused just say so and I'll try to go into it a bit more...</p> <p><strong>Can anyone explain me why does this happens?</strong></p> http://mathoverflow.net/questions/10009/calculate-the-root-of-a-number Calculate the Root of a Number Alix Axel 2009-12-29T07:32:37Z 2009-12-29T10:57:29Z <p><strong>For someone that has a limited math background can someone tell me what is the most straightforward and accurate way to calculate what the i-root of a float / integer number is?</strong></p> <p>PS: If someone would care to tag this question properly I would appreciate it, since I have no idea...</p> http://mathoverflow.net/questions/10009/calculate-the-root-of-a-number Comment by Alix Axel Alix Axel 2009-12-29T10:55:17Z 2009-12-29T10:55:17Z @Jos&#233;: Thanks, this is a algorithm question. @david: I asked it on StackOverflow (see <a href="http://stackoverflow.com/questions/1522207/calculating-roots-with-bcmath-or-gmp" rel="nofollow" title="calculating roots with bcmath or gmp">stackoverflow.com/questions/1522207/&hellip;</a>) and got no answers. The <code>bcroot()</code> function at <a href="http://mgccl.com/2007/01/30/new-upgrade-on-bcroot-speed-boost/" rel="nofollow" title="calculating roots with bcmath or gmp">mgccl.com/2007/01/30/&hellip;</a> uses the Newton's method but it gives me imprecise results for instance: <code>bcroot(27, 3)</code> equals <code>3.0000000000000975834575646153861799445756343117098345936525511526</code>. http://mathoverflow.net/questions/10009/calculate-the-root-of-a-number Comment by Alix Axel Alix Axel 2009-12-29T08:11:45Z 2009-12-29T08:11:45Z @Mariano: I've read the FAQ but I don't understand why this has no interest for mathematicians? @Jonas: Calculators must also use some kind of method, I suppose? http://mathoverflow.net/questions/9181/pascal-triangle-and-prime-numbers Comment by Alix Axel Alix Axel 2009-12-18T16:45:22Z 2009-12-18T16:45:22Z If and only if n is a prime, the n'th row will be all highlighted. Can't this be used to test the primality or is it too slow? http://mathoverflow.net/questions/9181/pascal-triangle-and-prime-numbers/9186#9186 Comment by Alix Axel Alix Axel 2009-12-17T17:13:28Z 2009-12-17T17:13:28Z Thanks, that is a bunch of very cool information. =)