Aspies For Freedom

Full Version: The Reciprocal of a Prime[Fun Math!]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
B"H

Hello.  Thank you for clicking on my post.  I am having a wonderful Passover.  This will be my last post for the Passover season.  I may as well have a little fun.  WinkCoolBig GrinSmileSmileSmileSmileSmileSmileRolleyes

Please read this about the reciprocal of a prime:

http://en.wikipedia.org/wiki/Prime_recip...gic_square

Now, one fact that jumps out is the fact that one divided by any prime (1/p) repeats itself after p-1 digits.  In other words, 1/7 repeats itself after 6 digits.  1/11 repeats itself after 2 digits, except that 2 goes in to ten evenly, so it could also be said to repeat itself every 10 digits.  1/13 repeats itself every six digits, six going in to 12 evenly, so it would also repeat every 12 digits.  Every 1/p repeats itself after p-1 digits, except for 1/2 and 1/5 in base 10, since 10 is not relatively prime to 2 and 5.  However, this is a pattern that works.

It derives from Fermat's little theorem. A^(p-1)= 1(modp)  I kind'a sort'a worked it out for myself, but I would still want to iron out some kinks.  The point is that it is a cool way for Nature to operate.  

The fact that 1/23 will repeat itself every 22 digits leaves me feeling that there is something in the world I can depend on.  I only wish that interest rates worked the same way...starting over from the beginning!Wink

All the best.

A True Monotheist Wrote:
B"H

Hello.  Thank you for clicking on my post.  I am having a wonderful Passover.  This will be my last post for the Passover season.  I may as well have a little fun.  WinkCoolBig GrinSmileSmileSmileSmileSmileSmileRolleyes

Please read this about the reciprocal of a prime:

http://en.wikipedia.org/wiki/Prime_recip...gic_square

Now, one fact that jumps out is the fact that one divided by any prime (1/p) repeats itself after p-1 digits.  In other words, 1/7 repeats itself after 6 digits.  1/11 repeats itself after 2 digits, except that 2 goes in to ten evenly, so it could also be said to repeat itself every 10 digits.  1/13 repeats itself every six digits, six going in to 12 evenly, so it would also repeat every 12 digits.  Every 1/p repeats itself after p-1 digits, except for 1/2 and 1/5 in base 10, since 10 is not relatively prime to 2 and 5.  However, this is a pattern that works.

It derives from Fermat's little theorem. A^(p-1)= 1(modp)  I kind'a sort'a worked it out for myself, but I would still want to iron out some kinks.  The point is that it is a cool way for Nature to operate.  

The fact that 1/23 will repeat itself every 22 digits leaves me feeling that there is something in the world I can depend on.  I only wish that interest rates worked the same way...starting over from the beginning!Wink

All the best.


ATM: I think that I have proven the "inverse prime repeating" property with Fermat's theorem.  If anyone out there likes math, perhaps I could share it with you via PM and have you check it?

Ask Dr. Math is getting a little tired of me....CoolBig GrinShyRolleyesWinkSmileShyCoolWinkRolleyes

All the best.

What math software do you use, ATM?
ATM - can you answer this - I had not ever watched (i think he is a creep) Matt louir - the today show) but I heard AMsterdam was on and I someday wnat to live there so  -a anyway, this is a clue for tomorrow's where in the world (is he going to show up tomorrow)- I am not good at puzzles - so do you know this answer...

This country is an anagram of a synonym of a homophone of an even prime number.

atypical Wrote:
ATM - can you answer this - I had not ever watched (i think he is a creep) Matt louir - the today show) but I heard AMsterdam was on and I someday wnat to live there so  -a anyway, this is a clue for tomorrow's where in the world (is he going to show up tomorrow)- I am not good at puzzles - so do you know this answer...

This country is an anagram of a synonym of a homophone of an even prime number.



ATM: Well, it's the anagram of a synonum of a homophone of "two."  
I can't venture to guess what that is.  Laos?  "Laos" is an anagram of "also" which is a synonym of "too."  If I remember what a homophone is correctly, "too" is a homophone of "two."  Let me know if I'm right.

All the best,

I think that you are right - I knew YOU could do it... !
B"H

OK.  I think that I have worked out why the reciprocal of any prime repeats itself every p-1 digits.  I asked Dr. Math, and got something a little too advanced for me.  I will try it this way:

So, let us use our base system a.  Let a be relatively prime to p.  (Note how 1/2 and 1/5 do not repeat themselves in base ten!).  

1/p=(x/a)+(y/a^2)+(z/a^3)...

Now, x is equal to a/p, except without any remainders.  a-mod(1)p is our remainder.  I use "mod p" to signify a multiple of p that we have without any remainder.  Our y value is a[a-p*mod(1)p]/p, without any remainders.  Call this number, without any remainders, mod(2)p.  OK, well, our z value will be [a[a(a-mod(1)p)]-p*mod(2)p]/p, without any remainders.  Call this number mod(3)p.  

By "mod" I mean multiple.  I never had a formal number theory class, so forgive me if I use the term "mod" in a little bit of a weird way for my educational betters!  OK, well, let us simplify our series:

x=a/p, no remainder, mod(1)p
y=a(a-mod(1)p)/p=[a-mod(1)p)]/p, which is mod(2)p
z=[a[a-(mod(1)p)]-mod(1)p)]/p= [a^2-mod2(p)]/p, which is mod(3)p
r=[a(a[a-mod(1)p])-mod(2)p]/p=[a^3-mod3(p)]/p
and, for every digit we move, we have [a^n-mod(n)p]/p.  

Then, we get to the 1/(a^p-1) place.  According to Fermat's little theorem, a^p-1=Mod(p)+1.  Mod p divided by p would be our numerator for the 1/a^p-1 place, since that is our closest multiple of p divided in to a^p-1, with no remainder.  Our remainder is 1/p, which is what we began with, repeating the cycle all over again...

Mod(p)/p would be a natural number, our numerator for the 1/(a^p-1) place.  That leaves 1 left over to renew the process for the a^p place.  But, wait a second, 1 was out original number that we started the division process with.  We have a cycle that will repeat itself!  And, it must, over and over, every p-1 digits.

OK. Let us test this:

1/7=.142857142857...

1 is 10/7, no remainder.  Remainder is 10-7, which is found below...

4 is 10[10-7]/7, no remainder, which is carried below

2 is 10[10[10-7]-4*7]/7, no remainder, which is carried below

8 is 10[10([10-7]*10-4*7)-2*7]/7, no remainder, which is carried below...

You get it.  OK, so we finally get to the sixth place,

which is 7.  This comes after a "5".  50/7=7 remainder...1.

2/7 will give us the same repeating sequence, since we can simply take the whole Algebraic series and multiply it.  Actually, weirdly, the sequence will continue the same.  It will "shift" over as we multiply it.  

Please critique my proof, since I am new to number theory.  My point is that this demonstrates a real pattern in existence that is numinous, quite amazing.  It does not work for 2 or 5 in base ten, since a must be relatively prime with p.  

You know, there is another thread discussing the idea of how mathematical skills advance one's social standing.  It is an interesting concept.  I just had an argument with my mother (G-d forgive us both) over the usual stupid nonsense.  But, just after, she wanted me to solve a doubling problem 2^x=50,000,000.  I told her that x was about 25.576, which could be rounded up to 26 if you want a lot more than 50,000,000 left over.  She thanked me profusely---after a conversation that was quite unpleasant.

Now, the problem was not *THAT* hard.  Most of you who have followed this thread would know it.  I think that what advanced one's social standing is not so much math as a level head, whether one is mathematically inclined or not.  Personally, I have taken less courses than many of you.  I am less educated than those of you who are computer people, scientists, mathematicians, savants, or whatever you may be.  Yet, I try to maintain a level head, even when others around you seem like they are irrational (at least from your perspective).  The art and practice of mathematics may well be something that keeps us rational.

Thus, the issue is less a matter of how "good" you are at it.  Rather, mathematics and rational philosophy can be said to keep us level headed.  By "rational philosophy" I do not mean agnosticism or secularism.  That is a modern notion.  The ancients of whatever creed would never have made such a claim.  It is the *ACT* of reasoning, not a philosophy called "rationalism", that keeps us level headed.  That may either advance one's social standing, or permit someone to be secure in oneself even when one's social standing is not that good.

Even people on a Reservation, as I sometimes think of myself as existing on a metaphoric "Aspie Reservation," can be internally free if one is rational and without emotional bondage.  That is my two cents worth.  I live a happy life even in the midst of a great degree of what is less than total freedom of personal advancement.

Please critique my proof.  Have a blessed weekend.  I now disconnect for the Sabbath.

All the best.
B"H

Let me correct myself.  This:

"x=a/p, no remainder, mod(1)p
y=a(a-mod(1)p)/p=[a-mod(1)p)]/p, which is mod(2)p
z=[a[a-(mod(1)p)]-mod(1)p)]/p= [a^2-mod2(p)]/p, which is mod(3)p
r=[a(a[a-mod(1)p])-mod(2)p]/p=[a^3-mod3(p)]/p
and, for every digit we move, we have [a^n-mod(n)p]/p."

Should be corrected.

The real values are as such, with each decimal place in an increasing 1/(a^n) place:

x=a/p, no remainder, carried on to decimal places in the base a system as .x
xy=a^2/p,no remainder, carried on to decimal places in the base a system as .xy
xyz=a^3/p, no remainder, carried on to decimal places in the base a system as .xyz

and we keep going until

.xyz....f=a^(p-1)/p, no remainder, carried "over" the decimal point

However, with Fermat's "little theorem," a^(p-1)=1(modp) we have something fun!

Since we defined our maiximum modp/p as "f", a^(p-1)/p is equal to f+1/p.  The 1/p is our remainder, which is carried over to the 1/a^p place.  However, is what began our series.  Thus, it will repeat again.  The inverse of a prime, 1/p, repeats itself every p-1 times.  A and p are relatively prime, of course.  (That is why 1/2 and 1/5 do not repeat for base 10!)

We can see this with 1/7, base 10.  a=10, p=7.

10/7=1,no remainder

.1

100/7=14 no remainder

.14

1000/7=142,no r

.142

and we keep going until we get 1,000,000/7=142857, no r, (.142857)  with a remainder of 1/7 carried over to the next place value. This repeats the cycle all over again.

1/7=.142857142857142857142857....

This is way cool.  And, I think that I explained it way better than I did before.  Sorry about the mess up above.

All the best.
Reference URL's