Viewing a single comment thread. View all comments

Oh_Tassos OP t1_ja7fntq wrote

Hello! What I've created for you today is, as the title describes, a way to visualise the answer to a problem from the Greek Mathematics Olympiad, named "Archimedes" after the ancient mathematician, which took place on February 18.

Well... sort of. The truth is that we were given some corrections about this problem near the final hour of the 3-hour examination, which vastly limited the actual correct answers (to just 2, from infinite)

Here's my best attempt at a translation of the problem, you can find the original exam (along with the solutions and list of students who passed the exam) over on the Hellenic Mathematical Society's website here.

For the various values of the positive integer n, identify all the positive integers N which are perfect squares and in their decimal representation the digit 2 appears n times and the digit 5 once.

The correction we were given was that these positive integers N only contain the digits 2 and 5, and not any others. The real solutions are 25 and 225, and you can prove by mathematical induction that there is no solution for n ≥ 3.

This visualisation does not take the correction into account. To make it, I used a program I made in C++ (to identify the numbers N), a csv sheet, and a program I made in Python (to actually draw the visualisation).

I will note about the Python program that some parts of the code, those regarding the rescaling of the window when it went off-screen and the colour gradient, were actually written by a fellow r/dataisbeautiful member after an older post of mine about prime numbers. I do not remember their name to credit them correctly, but props to them for the help.

I would also like to share a few graphs I made regarding the difference between two successive numbers N in this "sequence", for I think they look interesting at a sufficient zoom level. Here

That's all, thank you for your time!

Edit: I forgot to mention that this visualisation includes the first 10592 positive integers N, which is how far the C++ program got before it crashed (I assume it was a memory issue)

65

MathThatChecksOut t1_ja7o2w3 wrote

So what is actually visualized here? You have described a number theory problem and presented a colorful visual but it's not immediately clear how they are related.

49

Oh_Tassos OP t1_ja7ogku wrote

Ah yes, you're right. I got carried away explaining the context that I forgot to mention what we're actually seeing.

Basically you have this line that's counting non-negative integers, starting from 0, and every time it encounters a number from this problem (let's say 225) it makes a 90*n degree turn (in the case of 225, where n = 2, it'd be a 180 degree turn).

This doesn't hold any inherent meaning, it just creates a pretty visual. You are right that I entirely forgot to explain that part though.

Edit: the start is at the purple zone in the bottom right corner

47

nankainamizuhana t1_ja7yh0d wrote

So the intent, I assume, was to quickly visualize if there were a finite number of corners or a repeated pattern?

I'm quite curious about the large yellow vertical line. I can't decide whether it's more reasonable that the line is a large swath of integers with no perfect squares containing 2 or 5; or a large swath where all such perfect squares are of the form n=4m+2.

10

Oh_Tassos OP t1_ja7z72s wrote

It's the former, the difference between 1,530,609,129 and 1,499,470,729 which is equal to 31,138,400. That's way larger than any other numbers until that point. You can see this anomaly more clearly in the graph I linked near the end of my initial comment.

13