tag:blogger.com,1999:blog-63631427758008002772024-03-13T03:47:16.289-07:00Math Research, Tips and TricksMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-6363142775800800277.post-32743019587673899522015-06-10T16:12:00.001-07:002015-06-10T16:12:54.877-07:00Demystifying π (pt2)A couple years ago, I wrote a post entitled Demystifying pi. Since that time, Google Code decided to shut down hosting, so I decided to take a fresh look at it.
Here's a presentation and the new minimal code.Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-7900054398564808042013-10-15T15:37:00.000-07:002013-12-30T07:26:28.870-08:00Demystifying piOne of my pet peeves is that we routinely teach kids that things are impossible, unknowable, too complicated, et cetera. Another is when our equations are dirtied with exceptions to rules...
One example of this was my implementation of pi. That in turn was based on a modification of the continued fraction library to be a bit cleaner in the implementation.
It bugged me that my Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-88786405046740211292013-04-09T06:30:00.000-07:002013-04-09T06:30:27.082-07:00A224502: Prime numbers (together with one) whose representation in balanced ternary are palindromes. Quite often when I am doing prime number research and/or looking for patterns, I check the various number sequences against OEIS to see what other algorithms would come up with the same sequence. Usually, every sequence I look for is in there. For example:
A005408 - Odd Numbers
A000010 - Totients
A007318 - Pascal's Triange
And, now that I have published my first sequence to OEIS:
A224502 Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-70958393934053356562011-11-02T10:59:00.000-07:002011-11-02T10:59:12.548-07:00Shor, I’ll do itI ran into this article by Scott Aaronson today and thought I would share it. To wet your taste, here's the first sentence of the second paragraph:
Alright, so let’s say you want to break the RSA cryptosystem, in order to rob some banks, read your ex’s email, whatever.
Overall, I found it to be a pretty good writeup for the layman. It's a little esoteric when it comes to Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-49214324705814150472010-03-13T01:28:00.000-08:002010-03-13T01:28:13.661-08:00Stern–Brocot tree and Continuous FractionsThis post continues the previous entries on Continuous Fractions. This time, we expand the concept to encompass the Stern-Brocot tree.
The Stern-Brocot tree is a binary search tree where the two legs represent "less than" and "more than" (or Low,High or Left,Right, etc).
As you can see from the image, it starts with 1 (or 1/1) at the top. The left side is less than 1 and the right side isMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com2tag:blogger.com,1999:blog-6363142775800800277.post-34533691889154335292009-06-16T01:51:00.000-07:002009-06-16T01:52:14.902-07:00Slashdot: 47th Mersenne Prime ConfirmedThe new prime, 2^42,643,801 - 1, is actually smaller than the one discovered previously.Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-34818499623933098802009-05-18T00:18:00.000-07:002009-05-18T00:26:08.204-07:00Primality of 1When I was in school, I remember them teaching that a prime number was any number divisible by only 1 and itself. Thus, in school, they taught that 1 was prime. Since then, I have noticed that everyone insists that 1 is not prime. Since many of the patterns I find work better with 1 being prime, I decided to try to figure out why the discrepancy...From Wikipedia:Until the 19th century, most Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-19591485214132551772009-05-17T23:52:00.000-07:002009-05-18T00:15:11.147-07:00Prime digitsA coworker made a comment to me Friday about the distribution of digits in prime numbers. He was referring to a recent Slashdot article talking about the first digit in the prime number...but I have never liked thinking of the 1st digit as the far left... I'd prefer to think of the far right digit as digit 0. Can't help it - it's the whole positional notation thing (10^3 10^2 10^1 10^0 . 10^-1 Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com1tag:blogger.com,1999:blog-6363142775800800277.post-15731326777502708582009-04-27T22:27:00.000-07:002009-04-27T22:41:13.631-07:00Division by ZeroI've been on this kick lately where I have started question some of the basic assumptions I learned in math... things like "you can't easily define pi" or the concept of an "irrational number". Today's philosophical debate is on the idea of division by zero.This came up because I was creating a ContinuedFraction interface for integers... The number 3, for instance, is 3 + 0/0 + 0/0 .... etc... Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com3tag:blogger.com,1999:blog-6363142775800800277.post-69536067715250452532009-04-26T03:32:00.000-07:002011-08-11T12:34:32.502-07:00SeriesCF
While working on my ContinuedFractions library today, it occured to me that our current representation of pi could be simplified by just specifying the numerators and denominators as series...
I went ahead and changed the implementation to use a new SeriesCF class instead of the default ContinuedFraction class and I think the new approach is much cleaner.
Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com2tag:blogger.com,1999:blog-6363142775800800277.post-39684149704287547582009-04-25T14:25:00.000-07:002009-04-25T14:30:27.812-07:00PresenTeXWhile writing this package today, I came across the PresenTeX website. Very nice...from cf = d_0 + \cfrac{n_0}{d_1 + \cfrac{n_1}{d_2 + \cfrac{n_2}{d_3 + \cfrac{n_3}{\ddots\,}}}} I got:Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-52247280820988157222009-02-10T12:03:00.001-08:002009-02-10T12:47:47.045-08:00Continued FractionsI was working on some continued fractions, and came across the fundamental recurrence formula above. It worked pretty well for some simple continued fractions (like √2) but seemed to be a bit unfriendly towards calculating π.I'm using this definition of π:Now, using that definition with the above equation, it was always completely wrong...So I tried changing the equation...So you'll notice a fewMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-40146141964339486872007-07-27T11:51:00.000-07:002007-07-27T12:03:31.992-07:00Intuitive Approach to Wilson's TheoremThe other day I stumbled across something, only later to realize that it was Wilson's Theorem. Since the approach used to find it in the first place was more of a 'common-sense' approach than what you usually encounter for it, I thought I would go ahead and present it.Let's look at two examples.... For both, what we are looking for is:(n-1)! % n ≡ (n-1) mod n; iff n is primeExample 1: CompositeMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-62174627231410768582007-07-20T10:03:00.001-07:002007-07-20T10:03:43.104-07:00An Intuitive Guide To Exponential Functions & EFairly simple explanation of what 'e' is and how it works.Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-10342671488893444302007-07-15T20:34:00.000-07:002007-07-15T20:35:57.648-07:00Wikipedia: Mental ArithmeticI stumbled upon this today, and thought I would share. Some interesting stuff in there.We really should start teaching kids mental arithmetic at an early age rather than the "show your work or get an F"Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-67268006158036618752007-05-06T10:23:00.000-07:002012-01-12T23:09:48.765-08:00Coprime, aka. Relatively PrimeTwo numbers are coprime (relatively prime) if they have no factors in common.
I thought this image from Wikipedia was a good visual way of seeing it:
Figure 1. The numbers 4 and 9 are coprime because the diagonal does not intersect any other lattice pointsMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-61193913094239517282007-04-13T08:57:00.000-07:002007-04-13T08:59:49.715-07:00SubfactorialI thought this was a good way of explaining it:In practical terms, subfactorial is the number of ways of putting n letters into n envelopes (one in each envelope) with none in its correct envelope.Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-60836779055463621392007-04-05T17:13:00.000-07:002007-04-05T17:15:32.554-07:00PiThis is probably the simplest explanation of Pi that I have ever seen:Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-48821021154665800622007-03-01T14:10:00.001-08:002007-03-01T14:10:27.214-08:00Mock Theta FunctionsMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-81001402214587546542007-02-26T15:02:00.000-08:002007-02-26T15:03:29.716-08:00Sum of Seriessum of odd integers < 2n = n2sum of all integers = n(n+1)/2Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-79474094025577124772007-02-16T12:19:00.000-08:002007-02-16T12:20:58.479-08:00Pascals' CototientsSimilar to yesterdays' post, this one is based off the totients of the values in Pascal's triangle.. but this time, we are displaying the Cototients (n - totient(n))...Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-91894491086862411652007-02-15T15:33:00.000-08:002007-02-15T15:35:21.883-08:00Pascal's TotientsI was trying to figure out new ways to look at Pascals' Triangle today, and decided to look not at the actual binomial coefficients, but at the Euler Totients of them. Take a gander.Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-20789442996400126182007-02-12T07:39:00.000-08:002007-02-12T07:41:04.816-08:00Pascal and Binomial CoefficientsI realized that I never really showed how Pascal's Triangle is related to the Binomial Coefficients... So here we go:(x+1)0 = 1(x+1)1 =1x + 1 =1 1(x+1)2 =(x+1)(x+1) = x*x + x*1 + 1*x + 1*1 = 1x2 + 2x + 1 = 1 2 1(x+1)3 =(x+1)(x+1)(x+1) = ((x+1)(x+1))(x+1) = (1x2 + 2x + 1)(x+1) = (1x2*x + 1x2)+(2x*x + 2x*1)+(1*x + 1*1)= 1x3 + 1x2 + 2x2 + 2x + x + 1 = 1x3 + 3x2 + 3x + 1 =1 3 3 1(x+1)4 =(x+1)(x+1)(xMalachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-19896474010865240572007-02-07T12:02:00.000-08:002007-02-07T12:05:42.382-08:00A Modded Pacal TriangleAs you generate very large Pascal Triangles, the numbers quickly get out of control. If you are planning on modding the values after obtaining them, why not mod them first?Here you see an example of doing a mod5 before writing the number down... So, for example, the middle element on Row#4 is 1 because (3+3)%5 = 6%5 = 1... Now, you can use the number 1 for further rows instead of the original Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0tag:blogger.com,1999:blog-6363142775800800277.post-47522728653833741342007-02-06T15:51:00.000-08:002007-02-06T16:14:54.689-08:00Binary Representation of Pascal's TriangleTo look like this, one thing you might do is work out all the values of the previous lines and then mod them to determine whether they should be highlighted or not.Yet another way might be to just keep track of whether the values above are 1 or 0, and realize that the next one down is only 0 if both the parent hexes are 1.But, how about a way to do it without any regard to previous rows? This Malachi de AElfwealdhttp://www.blogger.com/profile/09298673505665552268noreply@blogger.com0