Archive for the ‘Math’ Category.

Autobiographical Numbers

Do you know that 1210 is the smallest autobiographical number? You probably do not know what an autobiographical number is. You are right if you think that such a number should be a pompous self-centered number whose only purpose in life is to describe itself.

Here is the formal definition. An autobiographical number is a number N such that the first digit of N counts how many zeroes are in N, the second digit counts how many ones are in N and so on. In our example, 1210 has 1 zero, 2 ones, 1 two and 0 threes.

Let us find all autobiographical numbers using the “zoom-in” method.

  1. By definition, the autobiographies can’t have more than 10 digits. It is nice to know that these egotistical numbers can’t be too grand.
  2. The sum of the digits in an autobiography equals the number of the digits. Consequently, the sum of the digits will not be more than 10.
  3. The first digit is the number of zeroes. As you know, self-respecting integers do not start with a zero. Hence, the number of zeroes is not a zero.
  4. Subtracting statement “c” from statement “b” above, we get a resulting statement that the sum of all the digits, except for the first one, is equal to the number of non-zero digits plus 1.
  5. That means, other than the first digit, the set of all other non-zero digits consists of several ones and 1 two.
  6. Furthermore, the number of ones is either 0, 1 or 2.

Now we continue zooming in in three different directions depending on the number of ones. In this blog entry, I will consider only the case in which there are no ones; I leave the other two cases to the reader.

  • If the number of ones is zero, then the only non-zero non-first digit of such a number is 2.
  • This 2 should be included in the autobiography; since the third digit of the number is not zero, it must be 2.
  • The number has 2 twos.
  • It must be 2020.

Here is the full set of autobiographical numbers: 1210, 2020, 21200, 3211000, 42101000, 521001000, 6210001000.

This is the sequence A104786 in the Online Encyclopedia of Integer Sequences (OEIS), where I first encountered the autobiographical numbers.

Autobiographical numbers are very cute numbers. But there is a problem with their name. If there is a notion of an autobiography of a number, then it would be logical to expect that there is a notion of a biography of a number. What would be the logical candidate for a biography of a number? Let us say that given a number N, its biography is another number M such that the first digit of M is the number of zeroes in N, the second digit of M is the number of ones in N and so on.

Of course, for a number to have a biography, we need to assume that none of its digit is present more than nine times. Still there are several problems with the definition of a biography.

The first problem is that if N doesn’t have zeroes, its biography starts with a zero. As numbers don’t start with 0, that biography is not a number! Furthermore, if N starts with 0, it can have a biography but N is not a number. Luckily for this article, a digit string starting with zeroes can’t be an autobiographical string, because the number of zeroes is not a zero. It is a relief that those illegitimate strings that are trying to pretend to be numbers can’t actually be autobiographical.

The second problem with biographies is that a number can have many biographies. Indeed, if a number doesn’t have nines, you can remove or add zeroes at the end of a biography to get another biography of the same number. Since mathematicians like to define things uniquely, we might consider it a problem if a number has several biographies. In real life it is possible to have many biographies of a person. So the second problem is not a big problem. I will call the shortest possible biography of a number the curriculum vitae and the longest possible biography the complete life story.

The third problem is that numbers with the same digits in different permutations have the same biographies. So in a sense a biography follows the life not of a number, but rather the set of its digits.

Suppose for now we allow a biography to start with 0. Also, let us choose the curriculum vitae — the shortest biography in case there could be several. Let us build a sequence of CVs. As an example, we start with 0. Zero’s CV is 1, one’s CV is 01, continuing that we get the following sequence: 0, 1, 01, 11, 02, 101, 12, 011, 12, 011, 12, …. You can see that the CVs’ sequence fell into a cycle in this case. I tried sequences of CVs starting with many numbers. I found that they fall into two cycles. One cycle is described above and another one is: 22, 002, 201, 111, 03, 1001, 22. Can you find another cycle or, alternatively, can you prove that all the numbers that allow the sequence of CVs converge to only these two cycles?

Let us build the sequence of complete biographies, that is, life stories, starting with 0: 0, 1000000000, 9100000000, 8100000001, 7200000010, 7110000100, 6300000100, 7101001000, 6300000100, …. We see that this sequence falls into a cycle of length two. The members of this cycle are legitimate numbers. These numbers are too shy to advertise themselves. But Alice praises Bob, because Bob praises Alice. It’s a very advantageous flattery pattern! I will call such a pair a mutually-praising pair. We’ve already seen mutually-praising strings: 12 and 001. Two other examples of number pairs thriving on each others’ compliments are, first, 130 and 1101, and second, 2210 and 11200.

Share:Facebooktwitterredditpinterestlinkedinmail

Fridays the 13th

Are you afraid of Friday the 13th? Here is my only Friday the 13th story.

It was Friday the 13th, and I was listening to the psychologist Joy Browne’s show. Joy asked her listeners to call in with stories of interesting things that happened to them on Friday the 13th. I wondered why I didn’t remember any stories about Friday the 13th.

At the end of her show, I went to pick up my mail, where I found a book kindly sent to me by Princeton University Press named Nonplussed!: Mathematical Proof of Implausible Ideas by Julian Havil. I opened this book to a random page, and it was Chapter 13. That was not such a big deal by itself, but in addition, Chapter 13 was titled “Friday the 13th”.

One of the things Julian Havil discussed in the chapter is how often the 13th of the month falls on different days of the week. You might remember from your elementary school education that the Gregorian calendar repeats an entire identical day-of-the-week cycle every 400 years. Hence, it is just a matter of calculation to check on which day of the week the 13th falls the most often.

Can you guess the answer? I am sure you can apply some meta-thinking and derive that there is one special day of the week on which the 13th most frequently falls. You might even guess by now that that day is Friday. Otherwise, why would I write this blog entry? Or what would Mr. Havil have to say in the whole chapter of the aforementioned book?

As we can see, this calculation increases the worry for people who suffer from paraskevidekatriaphobia — the fear of Friday the 13th. The 13th falls on Friday more often than on any other day.

Should we be worried?

Mathematically, the difference between the number of Fridays the 13th and, say, Thursdays the 13th is so small that it can only be observed when we look at the 400 year lifetime of the Gregorian calendar. Many countries have yet to experience the full cycle of the Gregorian calendar. For example, Russia adopted the calendar only in the 20th century. Is this why I am not so very afraid?

On second thought, for people of my generation, who are unlikely to live until the year 2100, the situation is slightly different. In the years between 1901 and 2099 our calendar has a days-of-the-week cycle of 28 years. You can calculate and check that in the period of 28 years, the 13th falls on any day of the week with the same probability. Hence, in events happening around my life time, there is not much to worry about, because Friday is no more special than any other day.

On third thought, a particular individual might see more Fridays on the 13th in his lifetime depending on the exact date of his birth. In my own life up to today, Monday is the most frequently occurring 13th. Maybe that’s why I do not like Mondays.

Share:Facebooktwitterredditpinterestlinkedinmail

9 Divides no Odd Fibonacci

I stumbled upon the following sentence in the MathWorld article on the Fibonacci numbers: “No odd Fibonacci number is divisible by 17.” I started wondering if there are other numbers like that. Of course there are — no odd Fibonacci number is divisible by 2. But then, an odd number need not be a Fibonacci number in order not to be divisible by 2.

So, let’s forget about 2 and think about odd numbers. How do we know that the infinite Fibonacci sequence never produces an odd number that is divisible by 17? Is 17 the only such odd number? Is 17 the smallest such odd number? If there are many such odd numbers, how do we calculate the corresponding sequence?

We’ll start with a general question: How can we approach puzzles about the divisibility of Fibonacci numbers? Suppose K is an integer. Consider the sequence aK(n) = Fn(mod K), of Fibonacci numbers modulo K. The cool thing about this sequence is that it is periodic. If it is not immediately obvious to you, think of what happens when a pair of consecutive numbers in the sequence aK(n) gets repeated. As a bonus for thinking you will get an upper bound estimate for this period.

Let us denote the period of aK(n) by PK. By the way, this period is called a Pisano period. From the periodicity and the fact that aK(0) = 0, we see right away that there are infinitely many Fibonacci numbers divisible by K. Are there odd numbers among them? If we trust MathWorld, then all of the infinitely many Fibonacci numbers divisible by 17 will be even.

How do we examine the divisibility by K for odd Fibonacci numbers? Let us look at the Fibonacci sequence modulo 2. As we just proved, this sequence is periodic. Indeed, every third Fibonacci number is even. And the evenness of a Fibonacci number is equivalent to this number having an index divisible by 3.

Now that we know the indices of even Fibonacci numbers we can come back to the sequence aK(n). In order to prove that no odd Fibonacci number is divisible by K, it is enough to check that all the zeroes in the sequence aK(n) have indices divisible by 3. We already have one zero in this sequence at index 0, which is by divisible by 3. Because the sequence aK(n) is periodic, it will start repeating itself at aK(PK) . Hence, we need to check that PK is divisible by 3 and all the zeroes up to aK(PK) have indices divisible by 3. When K = 17 it is not hard to do the calculations manually. If you’d like, try this exercise. To encourage (or perhaps to discourage) you, here’s an estimate of the scope of the work for this exercise: the Pisano period for K = 17 is 36.

After I checked that no odd Fibonacci number is ever divisible by 17, I wanted to find the standard solution for this statement and followed the trail in MathWorld. MathWorld sent me on a library trip where I found the proof of the statement in the book Mathematical Gems III by Ross Honsberger. There was a proof there alright, but it was tailored to 17 and didn’t help me with my questions about other such odd numbers.

The method we developed for 17 can be used to check any other number. I trusted this task to my computer. To speed up my program, I used the fact that the Pisano period for K is never more than 6K. Here is the sequence calculated by my trustworthy computer, which I programmed with, I hope, equal trustworthiness:

  • A133246 Odd numbers n with the property that no odd Fibonacci number is divisible by n.
    9, 17, 19, 23, 27, 31, 45, 51, 53, …

The sequence shows that 9 is the smallest odd number that no odd Fibonacci is ever divisible by, and 17 is the smallest odd prime with this same property. Here is a trick question for you: Why is this property of 17 more famous than the same property of 9?

Let us look at the sequence again. Is this sequence infinite? Obviously, it should include all multiples of 9 − hence, it is infinite. What about prime numbers in this sequence? Is there an infinite number of primes such that no odd Fibonacci number is divisible by them? While I do not know the answer, it’s worth investigating this question a little bit further.

From now on, let K be an odd prime. Let us look at the zeroes of the sequence aK(n) more closely. Suppose a zero first appears at the m-th place of aK(n). Then aK(m+1) = aK(m+2) = a. In this case the sequence starting from the m-th place is proportional modulo K to the sequence aK(n) starting from the 0-th index. Namely, aK(n+m) = a*aK(n) (mod K). As a is mutually prime with K, then aK(n+m) = 0 iff aK(n) = 0. From here, for any index g that is a multiple of m, aK(g) = 0. Furthermore, there are no other zeroes in the sequence aK(n). Hence, the appearances of 0 in the sequence aK(n) are periodic with period m.

By the way, m is called a fundamental period; and we just proved that the Pisano period is a multiple of the fundamental period for prime K. Hence, the fact that no odd Fibonacci number is divisible by K is equivalent to the fact that the fundamental period is not divisible by 3. It is like saying that if the smallest positive Fibonacci number divisible by an odd prime K is even, then no odd Fibonacci number is divisible by K.

If the remainder of the fundamental period modulo 3 were random, we would expect that about every third prime number would not divide any odd Fibonacci numbers. In reality there are 561 such primes among the first 1,500 primes (including 2). This is somewhat more than one third. This gives me hope that there is a non-random reason for such primes to exist. Consequently, it may be possible to prove that the sequence of prime numbers that do not divide odd Fibonacci numbers is infinite.

Can you prove that?

Share:Facebooktwitterredditpinterestlinkedinmail