One day I was playing with some numbers (sometimes boredom is good for finding creative stuff to do, which school creates the perfect environment for), I noticed that for a positive odd integer n; \\(n^2 – 1\\) can always be divided by 4 (not 2). This is almost irrelevant to what I actually found, but this started something, which is me trying to mass test this with code. I wrote some code in C (actually I first wrote in Python, but then switched to C for the great performance boost), the results were unexpected to me. Indeed all of them divide by 4 (and also 8), but this was because the structure of odd numbers which is 2n – 1, so 1 minus the square of for this number would be:

4n² – 4n = 4(n² – n)

if a is an odd number the square of it would also be odd, and odd numbers from odd numbers gives us even numbers, in the case that is is even, then obviously the square also would be, and subtracting even from even gives us even numbers. So in every case it must be divisible by 2³, or 8.

What came next was surprising to me though. When I switched from looking for twos to threes (checking for 3, 9, 27 etc.) The average of how many times the number could be divided was 1, and when I switched to fives it was 0.5, and for sevens it was 1/3. It seemed that the average for the nth prime was 1/p-1. I was just dreaming, it wasn’t about primes, it was about odd numbers because odd numbers weren’t messed up by the squares like even ones. After a while thinking about this I decided to try this on plain numbers (without the squaring and decrementing part), now it was more clear, for any number x to check the number of perfect divisions, the average was 1/x-1. At this point text was getting hard and I wanted this on formula, so I wrote it like this:

lim(n → ∞)
n! || x^y
1       y
— = —
x-1   n

I was eagerly searching for a reason why this could have happen, I was searching the internet only to find nothing. One day, it came to me, and here is the explanation:
It is about probability actually. Let’s select 3 as the number to check. The probability that any integer is a multiple of 3 is 1/3, and the probability of it being a multiple of 3^2 is 1/9…
Some of you might have understood where this is going, the sum of infinite geometric series are equal to (1/3) / (1 – 1/3) which is equal to 1/2 or 0.5.

When I finally found the reason for this I noticed how much I spent time on computing the numbers, I tried to not talk much about the computing of these numbers but I spent too much time on writing the C code and making it run on bigger scales. At the end making it run on bigger scales didn’t give me much, I just saw the average get closer and closer to 0.5, or the number I expected. Instead of trying to compute, if I thought on the reason from the start I could have found this earlier. This has been a lesson for me and I wanted to share it.

Tags: matematik
0 Yorum

Bir Cevap Bırakın

©2024 Öğrenci Teknoloji Takımı 2022 Emeği GeçenlerODTÜ GVO - BLOG


We're not around right now. But you can send us an email and we'll get back to you, asap.


Kullanıcı Bilgileriniz İle Oturum Açın


Bilgilerinizi Unuttunuzmu?

Create Account