The Pinocchio and Oihcconip Sequences

What is base 3/2? One of the ways to define such a base is to think of it in terms of exploding dots. What the heck are exploding dots? They are explained and popularized by James Tanton in his YouTube videos.

Essentially, “exploding dots” is a machine made of a row of boxes with rules describing how the dots loaded into the machine explode. As an example, let me describe the 1←2 machine, which corresponds to base 2. We load N dots into the rightmost box. Whenever there are 2 dots in one box, they explode into 1 dot in the box to the left.

Exploding dots base 2

For example, to write 5 in base 2, we would first load 5 dots in the rightmost box, as in the figure above. Then each group of 2 dots in the rightmost box would explode, and for each group, 1 dot would appear in the box to the left. Finally, the 2 dots in the second box would explode into 1 dot into the next box to the left. By reading the number of dots from left to right, we get 101, which is 5 in base 2.

The interesting thing here is that there is no reason this model should be exclusive to integer bases. Suppose our rule is that 3 dots explode into 2 dots in the box to the left. Such a rule is called the 2←3 machine, and it corresponds to base 3/2. To represent 5 in this base, we load 5 dots into the rightmost box, then we use the exploding rule shown in the figure below. Using this machine, 5 is represented in base 3/2 as 22.

Exploding dots base 3 over 2

The figures were made by my junior PRIMES STEP group, in the 2017-2018 academic year, for our paper, Variants of Base 3 Over 2.

But, in this post, I want to discuss a different paper from the same academic year. With my senior PRIMES STEP group, we wrote a paper On Base 3/2 and its Sequences. A shorter version which includes a tribute to John Conway, appeared in The Mathematical Intelligencer.

Speaking of John Conway, he liked inventing new sequences, especially ones with unusual behaviors. One of his hobbies was tweaking the Fibonacci rule to create new sequences, which he called Fibs. For example, the sorted Fibs sequence starts the same as the Fibonacci sequence with 0 and 1. To calculate the next term, we add the two previous terms and sort the digits in non-decreasing order. In base 10, this sequence is A069638: 0, 1, 1, 2, 3, 5, 8, 13, 12, 25, 37, 26, …. It is known that this sequence is periodic with a maximum value of 667.

With my senior PRIMES STEP group, we studied analogs of this sequence in base 3/2. We begin with the sorted Fibs sequence fn with the same two initial values that start the Fibonacci sequence: f0 = 0 and f1 = 1. To calculate fn+1, we add fn-1 and fn in base 3/2 and sort the digits in non-decreasing order. It follows that the numbers in the sequence are written as several ones followed by several twos. Unlike base 10, the sequence is not periodic and grows indefinitely: 0, 1, 1, 2, 2, 12, 12, 112, 112, 1112, 1112, 11112, …. In recognition of the constant growth of this Fibs sequence, we call it the Pinocchio sequence.

Obviously, you can start the sorted Fibs sequence with any two numbers. But we proved an interesting theorem which stated that any sorted Fibs sequence eventually turns into either the tail of the Pinocchio sequence or the 3-cycle 112, 1122, 1122.

However, we didn’t stop there. There are two natural ways to sort the digits of a number, in increasing or decreasing order. Naturally, there is another type of sequences worth considering, in which the digits are sorted in non-increasing order. We called such sequences the reverse sorted Fibs.

We defined the reverse sorted Fibs sequence rn in base 3/2 as follows. To calculate rn+1, we add rn-1 and rn in base 3/2 and sort the digits in non-increasing order, ignoring zeros. It follows that after the initial terms, the terms of such a sequence are represented with several twos followed by several ones. We call the reverse sorted Fibs that start in a similar way to the Fibonacci sequence with r0 = 0 and r1 = 1, the proper reverse sorted Fibs. Here are several terms of the proper reverse sorted Fibs: 0, 1, 1, 2, 2, 21, 21, 221, 2211, 221, 221, 2211, 221, 221, 2211, …. This sequence becomes cyclic, starting from r7.

We also found one reverse sorted Fibs growing indefinitely: 2211, 2211, 22211, 22211, 222211, 222211, and so on. We proved that any reverse sorted Fibs sequence eventually turns into either this sequence or a 3-cycle sequence: 221, 221, 2211. The similarity between the sorted Fibs and the reverse sorted Fibs surprised us. Up to the initial terms, they both have exactly one sequence which grows indefinitely and one 3-cycle. To emphasize this similarity, we reversed the word Pinocchio and named this growing reverse Fibs sequence the Oihcconip sequence.

Now I need to figure out how to pronounce the name of this new sequence.

Share:Facebooktwitterredditpinterestlinkedinmail

My Vision for Number Gossip

I run Number Gossip, where you can input a number and get some of its cute properties. For example, the number 63 is composite, deficient, evil, lucky, and odd. In addition, it has a unique property: 63 is the smallest number out of two (the other being 69), such that the common alphabetical value of its Roman representation is equal to itself. Indeed, the Roman representation of 63 is LXIII, where L is the 12th digit, X is the 24th, and I is the 9th. Summing them up, we get 12 + 24 + 9 + 9 + 9 = 63 — the number itself.

I have a list of about 50 properties of numbers that my program checks. Each number greater than one gets at least four properties. This is because I have four groups of properties that cover all the numbers. Every number is either odd or even. Every number is either deficient, perfect, or abundant. Every number greater than one is either prime or composite. Every number is either evil or odious.

In addition, I collect unique number properties. During the website’s conception, I decided not to list all possible unique properties that I could imagine but to limit the list to interesting and unusual properties. My least favorite properties of numbers are the ones that contain many parameters. For example, 138 is the smallest number whose base 4 representation (2022) contains 1 zero and 3 twos. If you are submitting a number property to me, keep this in mind.

Some parameters are more forgiving than others. For example, 361 is the smallest number which is not a multiple of 9, whose digital sum coincides with the digital sum of its largest proper divisor. In more detail, the digital sum of 361 is 3 + 6 + 1 = 10, while 19, the largest divisor of 361, has the same digital sum of 10. In this case, the parameter 9 is special: for a multiple of 9, it is too easy to find examples that work, such as 18, 27, and so on. Sequence A345309 lists numbers whose digital sum coincides with the digital sum of their largest proper divisor. The first 15 terms of the sequence are divisible by 9, and 361 is the smallest term that is not divisible by 9.

By the way, another number that is buried deep in a sequence is 945, which is the smallest odd abundant number. There are 231 abundant numbers smaller than 945; all of them are even.

A more recent addition to my collection is related to the sequence of distended numbers (A051772). Distended numbers are positive integers n for which each divisor of n is greater than the sum of all smaller divisors. It is easy to see that for distended numbers, all sums of subsets of divisors are distinct. The opposite is not true: 175 is the smallest number, where all sums of subsets of its divisors are distinct, but the number itself is not distended.

It is difficult to find special properties for larger numbers, so I am less picky with them. For example, 3841 is the number of intersections of diagonals inside a regular icosagon. The word icosagon hides a parameter, but I still like the property.

I invite people to submit number properties to me. And I received many interesting submissions. For example, the following oxymoronic property was submitted by Alexey Radul: 1 is the only square-free square.

The numbers below 200 that still lack unique properties are 116, 147, 155, 162, 166, 182, and 194. The earliest century that doesn’t have unique number properties ranges between 7000 and 7100. The next ones are 8000–8100 and 9100–9200. By the way, my site goes up to ten thousand.

I also have a lot of properties in my internal database that I haven’t checked yet. I am most interested in the proof of the following property: 26 is the only number to be sandwiched between any two non-trivial powers.

Share:Facebooktwitterredditpinterestlinkedinmail

Retouched Picture of John Conway

One of my posts about John Conway has a picture I took of him in 2015, leafing through a book about himself, Genius at Play. I allowed Wikipedia to use this image, and they did. They also retouched it for their article on John Conway in Dutch. I like the result.

Genius at Play
Genius at Play

Share:Facebooktwitterredditpinterestlinkedinmail

Best of the 2022 MIT Mystery Hunt

Every year, after the MIT Mystery Hunt was over, I would go through all the puzzles and pick out the ones related to mathematics. This year, I didn’t feel like doing it. Besides, I think it is more important to collect quality puzzles rather than all the puzzles by topic. So my new collection is the puzzles recommended to me, which I might like.

I start with math and logic puzzles.

I continue with computer science.

I carry on with some non-math fun.

I conclude with the plot device round. All the puzzles in this round are relatively easy. But our team got stuck on them until we realized that we already had the answer, which was not a single word. Here are some of the puzzles that were specifically recommended.


Share:Facebooktwitterredditpinterestlinkedinmail

Crocheting Away My Pain

Putin became the 21st century Hitler. I call him Putler.

I am an American. However, I was born in Moscow and lived my youth in the Soviet Union. I speak Russian, and I have friends in both Russia and Ukraine. The war in Ukraine is the biggest tragedy of my life. When Putler invaded Ukraine, I didn’t know what to do. I wanted to pick up a rifle and go to Ukraine to fight, but then I remembered my CPAP machine and the distilled water it needs, and I didn’t go. Instead, I ended up watching the news non-stop. Then I started sending money to different organizations supporting Ukraine.

However, I am a mathematician, so I tried to figure out whether I could help Ukraine by doing math. At first, I posted math problems from Ukraine Olympiads. Then I started discussing what we could do with my PRIMES colleges. The result was a new program, Yulia’s Dream, in honor of Yulia Zdanovska, a 21-year-old brilliant young Ukrainian mathematician killed by a Russian-fired missile. Yulia’s Dream is a free enrichment program for high-school students from Ukraine who love math.

All these activities didn’t help me with the pain. So I started crocheting. I bought yarn in the colors of the Ukrainian flag and crocheted a hyperbolic surface of constant curvature. The first picture shows the thingy from above. The second one is there for you to estimate its size: this is the biggest crocheting project I have ever finished.

Hyperbolic surface in colors of Ukrainian flag
Hyperbolic surface in colors of Ukrainian flag on my head

For a free Ukraine! Let democracies win over dictatorships!


Share:Facebooktwitterredditpinterestlinkedinmail

Arnold’s Advice

I wrote a lot about how during entrance tests for Moscow State University, the examiners were giving Jewish and other undesirable students special (e.g. more difficult) questions during the oral exams. (See, for example, our paper Jewish Problems with Alexey Radul.) Not all examiners agreed to do this. So the administration made sure that there were different exam rooms: brutal rooms with compliant examiners torturing students with difficult questions, and normal rooms with normal examiners testing preapproved students. The administration also had other methods. One of them is the topic of this essay.

The math department of Moscow State University had four entrance exams. The first was a written math test consisting of three trivial problems, a very difficult one, and a brutally challenging one. At the end, I will show you a sample: a trivial problem and a very difficult one from 1976, my entrance year.

What was the point of such vast variation in difficulty, you may ask? There were two reasons.

But first, let me explain some entrance rules. The exam was scored according to the number of solved problems. A score of two or less was a failing score. People with such scores would be disqualified from the next exam. Any applicant with a smidge of mathematical intelligence would be able to solve all three trivial problems. Almost all applicants who qualified for the next test would have the same score of three on the first test, as they wouldn’t be able to solve the last two problems. Thus, mathematical geniuses and people who barely made the cut got the same score.

There was another rule. Officially, people with a gold medal from their high school (roughly equivalent to a valedictorian) could be accepted immediately if they scored 5 on the first exam. So one of the administrative goals was to prevent anyone getting a 5, thus, blocking Jewish applicants from sneaking in after the first exam.

Another goal was to have all vaguely qualified people get the same score. The same goal applied to other exams. After the four admission exams, the passing score, say X, was announced. A few people with a score higher than X were immediately accepted. Then there were hundreds of applicants with a score of X, way more than the quota of people the department was planning to accept. An official rule allowed the math department to pick and choose whoever they wanted from everyone who scored X.

I heard a speech by the famous Russian mathematician, Vladimir Arnold, directed at decent examiners who tested “approved” students at the oral math exam, which was the second admissions exam. His suggestion was brilliant and simple. If the students are good and belong in the department, give them an excellent grade of 5. If not, give them a failing grade of 2. Arnold’s plan boosted the chances of good students doing better than the cutoff passing score X and removed mediocre students from the competition. His idea was not only brilliant and simple but also courageous: he was risking his career by trying to fight the system.

I never experienced the entrance exams firsthand. By ministry order, as a member of the USSR IMO team, I was accepted without taking any exams. I already wrote an essay, A Hole for Jews, about how getting on the IMO team was the only way for Jewish students to get into the Moscow State University, and how the University tried to block them.

But I still looked at the entrance exam problems I would have had to solve to get in. The last two problems scared me. Now I found them again online (in Russian) at: the 1976 entrance test. The trivial problem below is standard and mechanical, while the other problem still looks scary.

Trivial problem. Solve for x:

1976 Mekhmat Entrance Test

Solution. We were drilled in school to solve these types of problems, so this one was trivial. First, make a substitution: y = 3x. This leads to an equation: (2y – 1)(y – 3)/(y2 – 2)(y – 1) ≤ 0. From this we get ranges for y: (-∞, -√2], [1/2,1], [√2, 3]. The last step is to take a logarithm.

Very difficult problem. Three spheres are tangent to plane P and to each other. Two of the spheres are the same size. The apex of a circular cone is on P, and the cone’s axis is perpendicular to the plane P. All three spheres are outside the cone and tangent to it. Find the cosine of the angle between the cone’s generatrix and the plane P, if one of the angles of the triangle formed by the intersection points of the spheres and the cone is 150 degrees.


Share:Facebooktwitterredditpinterestlinkedinmail

Already or Have

I stumbled upon one of Smullyan’s puzzle on Facebook, in Russian. I couldn’t find the original text, so I just translated it back for my students.

Puzzle. You are on an island where only truth-tellers and liars live. The truth-tellers always tell the truth, and the liars always lie. You meet an islander who sits with you for a long time, then says, “I already said this sentence.” Is he a truth-teller or a liar?

I expected the following solution. If this islander is a truth-teller, then there should have been a time when he said, for the first time, “I already said this sentence.” But this would create a contradiction.

However, my students used this puzzle as an opportunity to teach me some intricacies of the English language. They explained to me the ambiguities of my translation. Here is a shortened and lightly edited quote from one of them:

There are two different linguistic opinions that give different answers to this problem. The first is that the truth of a statement is decided at the moment it starts to be delivered: in this case, when the islander starts saying his statement. With this interpretation, for the statement to be true, he had to have said the sentence before, and for that to be true, he had to have said it even before that, and this continues indefinitely. Clearly, he cannot have been alive forever, so he has to be a liar.
The other opinion is that the verity of a statement is decided at the exact conclusion of its deliverance. Then, when the islander finishes saying his sentence, its truth is judged, and he has at that same instant “already” said the sentence, so he is telling the truth. By this interpretation, the islander is a truth-teller.

Another student had a different brilliant idea. Depending on the islander’s intonation, it is possible that he says, “I already said ‘this sentence’.” In that case, there are no self-referencing sentences, and the islander could be either a truth-teller or a liar.

I consulted my best English consultant: my son, Alexey, and here is his reply. “The basic answer is that neither truth nor semantic meaning are absolute, and edge cases will be judged differently by different observers. A sentence whose truth is time-dependent on the same scale as the duration of uttering the sentence is clearly an edge case. That’s why mathematicians intentionally try to eliminate ambiguity from their communication.”

He suggested the following fix for the puzzle’s translation.

Fixed puzzle. You meet an islander who says, “I have said this sentence before.” Is he a truth-teller or a liar?

Alexey didn’t stop at fixes and suggested the following bonus puzzles.

Bonus puzzle 1. You meet an islander who says, “I will have said this sentence.” Is he a truth-teller or a liar?

Bonus puzzle 2. You meet an islander who says, “I will say this sentence again.” Is he a truth-teller or a liar?

Share:Facebooktwitterredditpinterestlinkedinmail

The 1978 Ukrainian Math Olympiad

Ukraine is on my mind. Here is a problem for 9-graders from the 1978 Ukrainian Math Olympiad:

Problem. Prove that for every natural number n, the following number is not an integer.

1978 Ukrainian Olympiad

Share:Facebooktwitterredditpinterestlinkedinmail

Calculating the Average Age in Secret

Oskar van Deventer is a designer of beautiful mechanical puzzles. For the recent mini-MOVES gathering at the MoMath, he asked people in his Zoom breakout room to calculate the average age in the room without revealing their actual ages. I know the following solution to this puzzle.

People agree on a large number N that is guaranteed to be greater than the sum of all the ages. The first person, say Alice, thinks of a uniformly random integer R between 0 and N. Alice adds her age to R modulo N and passes the result to the second person, say Bob. Bob adds his age modulo N and passes the result to the third person, and so on. When the result comes back to Alice, she subtracts R modulo N and announces the sum total of all the ages.

During this process, no one gets any information about other people’s ages. But two people can collude to figure out the sum of the ages of the people “sitting” between them.

I gave this problem to my grandson, and he suggested the following procedure. First, people choose two trusted handlers: Alice and Bob. Then, each person splits their age into the sum of two numbers (the splitting should be random and allow one of the numbers to be negative). They then give one number to Alice and another to Bob. Alice and Bob announce the sums of the numbers they receive. After that, the sum total of everyone’s ages is the sum of the two numbers that Alice and Bob announce.

The advantage of this method is that no two people, except Alice and Bob, can collude to get more information. The disadvantage is that if Alice and Bob collude, they would know everyone’s age. Which method would you prefer?

Share:Facebooktwitterredditpinterestlinkedinmail

Weird Ways to Improve Your Erdős Number

Many years ago, I wrote a blog post about an amusing fact: John Conway put Moscow, the former capital of the USSR, as a coauthor: A Math Paper by Moscow, USSR. Thus, Moscow got an Erdős number 2, thanks to Conway’s Erdős number 1. At that time, my Erdős number was 4, so I wondered if I should try coauthoring a paper with Moscow, my former city of birth, to improve my Erdős number.

This weird idea didn’t materialize. Meanwhile, my Erdős number became 2 after coauthoring a paper with Richard Guy, Conway’s Subprime Fibonacci Sequences. I relaxed and forgot all about my Erdős status. I couldn’t do better anyway, or could I?

I recently heard about a cheater who applied to grad schools. In addition to a bunch of fabricated grades, the cheater submitted an arXiv link to a phony paper. What is fascinating to me is that the cheater put real professors’ names from the university the cheater supposedly attended as coauthors. The professors hadn’t heard of this student and had no clue about the paper. So the cheater added fake coauthors to add legitimacy to their application and boost the perceived value of the cheater’s “research”. As a consequence, the cheater got a fake Erdős number.

I hope that the arXiv withdrew the paper. Cheating is the wrong way to improve one’s Erdős number.

But here is another story. Robert Wayne Thomason named as coauthor his dead friend, Thomas Trobaugh. The paper in question is Higher Algebraic K-Theory of Schemes and of Derived Categories and can be found at https://www.gwern.net/docs/math/1990-thomason.pdf. This paragraph in the paper’s introduction explains the situation.

The first author [Robert Wayne Thomason] must state that his coauthor and close friend, Tom Trobaugh, quite intelligent, singularly original, and inordinately generous, killed himself consequent to endogenous depression. Ninety-four days later, in my dream, Tom’s simulacrum remarked, “The direct limit characterization of perfect complexes shows that they extend, just as one extends a coherent sheaf.” Awaking with a start, I knew this idea had to be wrong, since some perfect complexes have a non-vanishing K0 obstruction to extension. I had worked on this problem for 3 years, and saw this approach to be hopeless. But Tom’s simulacrum had been so insistent, I knew he wouldn’t let me sleep undisturbed until I had worked out the argument and could point to the gap. This work quickly led to the key results of this paper.

This precedent gives anyone hope that they might achieve an Erdős number 1. You just need to wait for Paul Erdős to come to you in your dreams with a genius idea.


Share:Facebooktwitterredditpinterestlinkedinmail