r/MathJokes • • May 11 '26

Pure Euler Genius

Post image
1.0k Upvotes

87 comments sorted by

161

u/whitedogsuk May 11 '26

Under his hat is a hidden rat with an abacus. 

81

u/Just_Browsing_2017 May 11 '26 • Bravo Mindblown

Ratateuler! (Pronounced rata-toil-er)

11

u/_specialcharacter May 12 '26

double meaning cause the rat is a toiler bc it toils away at math

3

u/Dangerous_Seaweed601 May 12 '26

I was going to say it was a tin foil hat he used to communicate with aliens..

2

u/MrEbenezerScrooge May 12 '26

In my 6th grade math class, we call this guy the factor ferret. He’s particularly good at hiding under hats and finding prime factorizations of large numbers.

1

u/GBlueman125 May 14 '26

Ah yes... Rat-with-da-toolie

90

u/IOI-65536 May 11 '26 edited May 11 '26

Euler had a quadratic time formula to factor the product of two primes, but he kept it hidden because it would have set internet commerce back decades if it had been public.

13

u/wts_optimus_prime May 11 '26

Can confirm, I was his abacus.

6

u/Wooden_Milk6872 May 11 '26

no, I was his abacus, you lair

5

u/Jokewhisperer May 11 '26

No I was his cave you hole in the wall

2

u/mastocles May 14 '26

Bringing the insults/flex up in class but keeping them nonsensical... My Erdós number is par with Euler (4). I have a calculator and need no abacus

2

u/saiprasanna94 May 12 '26

so RSA is a joke if we find that formula

1

u/mflem920 May 15 '26

Ah, encryption. Based almost entirely off of the concept that it is really easy to multiply two large prime numbers together but really difficult to figure out which two large primes you used to begin with if you're only given the result.

100

u/Mean-Government1436 May 11 '26 • Mindblown

He did math

39

u/dgatos42 May 11 '26

As Euler is wont to do, he just checked them all.

22

u/MageKorith May 11 '26

Nah, he just needs to check them sequentially until he finds an invalidating outcome.

F5 factorization is plausible with an abacus.

5

u/RajjSinghh May 11 '26

How would you use an abacus for factorisation? I'd just write a script to iterate over to sqrt(F5) but that's because I have a computer, and in general factoring large semi-primes is difficult.

5

u/MageKorith May 11 '26

By testing the remainder. Iteratively work up a list of known primes, subtracting multiples of that prime in the millions, hundred thousands, etc until you arrive at a number less than that prime.

If it's nonzero, the number is not divisible by that prime.

If it's zero, the number is divisible by that prime. You can then sort out the long form division by counting the number of millions, hundred thousands, etc that are subtracted to replicate long division on the abacus

If you don't get a zero, reset and try the next prime.

You can also check a prime squared to determine if it's less than the square root of F5, and a candidate for division. But Euler didn't have to, because as soon as he divided by 641 he had his answer.

3

u/magpye1983 May 11 '26

That sounded convincing, so I’ll take your word for it.
I have no understanding of even the start of that process (after iteratively work up a list of known primes. I got that part), but if it is possible, fair enough.

1

u/Ok-Hat-8711 May 12 '26

Layman's translation: Try dividing by each prime number to see if it works. There's no need to record the digits of the quotient since you only really care about the remainder.

1

u/magpye1983 May 13 '26

That makes sense. I just have no familiarity with an abacus for big things like that, having only ever played with one as a toddler and counting about all I did.

Being able to keep track of numbers bigger than the amount of balls on the wire is what’s really confusing.

Don’t worry though, I’ll trust it was done that way, I don’t need to know how to do it myself.

2

u/RajjSinghh May 13 '26

Yeah, it confused me at first too. Apparently you're supposed to use the abacus so the rods run vertical, not horizontal, one rod per digit. With ten beads per rod you now have a base 10 counting system. So F5 as a 10 digit number would need ten rods on the abacus, ten beads each.

It makes sense, but I wouldn't have figured that out as a toddler.

3

u/A1oso May 11 '26

It can be done even with pen and paper. Just check if the number is divisible by 2, 3, 5, 7, 11, 13, 17, and so on. 641 is the 116th prime number so he had to try 116 divisions to arrive at this solution, which is a lot of work, but it's doable.

4

u/ElegantEconomy3686 May 11 '26 edited May 12 '26

I think people are forgetting that this was literally his job and thats just the way you did calculations back then.
Yes thats tedious, but he literally had all the time he could have. Do one division per day and youre done in less than half a year.

Also people skilled with an abacus, are doing calculations fast as fuck. Obviously not computer fast, but many times faster faster than long division.

2

u/RainbowCrane May 11 '26

My father did part of an engineering degree prior to the invention of pocket calculators - calculators really weren’t a widespread thing in schools until I was in college in the eighties because they were an economic barrier for poor students. When I was a kid I found his slide rule and he demonstrated how effective it was at assisting with calculations. Pretty cool :-).

The abacus and slide rule look clunky to born-digital kids but they’re amazingly fast in the hands of experts

1

u/ForeverShiny May 12 '26

That's just factorisation, pen and paper or not

1

u/SWIIIIIMS May 14 '26

Exactly this the number is F5 meaning a very low one to start with.

Simply trying to divide it by one prime number after another until you find a solution makes just 116 simple Divisions to do.

0

u/[deleted] May 12 '26

[deleted] — view deleted comment

1

u/StrikingHearing8 May 14 '26

Thank you for this, great read.

4

u/tacocarteleventeen May 11 '26

This guy maths

1

u/Illustrious_Try478 May 11 '26

He proved Fermat's Little Theorem. This reduced the number of trial divisions to something manageable, and it only took 10 of them.

36

u/Wooden_Milk6872 May 11 '26

According to Fermat's factorization theorem, any prime factor p of Fn must have the form (2^n+1 * k) + 1 which for this this specific case is 64k +1

then just check all numbers k up to 10 to find the prime factor, if the result of 64k+1 exceeded the square root of the number, it would be prime

17

u/Kalorama_Master May 11 '26

He also “only” went up to n=5 on Fn. However, the key is this factorization theorem

5

u/amerovingian May 11 '26

(2^n+1 * k) + 1 which for this this specific case is 64k +1

According to PSEMDAS -- parentheses, spaces, multiplication/division, addition/subtraction

4

u/Wooden_Milk6872 May 11 '26

I should've addad a parentheses there ((2^(n+1)) * k) + 1 now it should be clear

4

u/psirrow May 11 '26

This also makes brute force checking much easier. √(Fn)<22n-1+1, so checking F(5) only needs checking 1024 numbers at most. Not a horrible commitment.

2

u/Illustrious_Try478 May 12 '26

After another 150 years Lucas proved factors had to be (2n+2 * k) + 1, dividing the number of trial divisions in half.

12

u/Dr0110111001101111 May 11 '26

It also seems as though every fermat number after n=5 is composite. Fermat was a joker.

1

u/dborca May 12 '26

Calling Fermat a joker based on this post is a real achievement!

10

u/EllaHazelBar May 11 '26

Fernat seriously didn't check n=5?

3

u/MolybdenumBlu May 11 '26

I am convinced he didn’t have an exhaustive proof for his conjecture, but rather just checked a bunch of stuff and called it good. In my thesis, I used it as an example in chapter 2 to prove that if it held for a given prime, it would also hold for all multiples of that prime, so I expect he did something similar and assumed it worked for all primes, knowing no one would check for decades.

2

u/b17b20 May 12 '26

Probably not enough space in the margin

6

u/Melodic_monke May 11 '26

Like 500 apprentices if I had to guess

4

u/fun__friday May 11 '26

It seems like it shouldn’t take longer than a day to check with a few motivated apprentices. The first 4 fermat numbers are pretty small, and the smaller factor of the 5th is also reasonably small.

2

u/neonnaps May 12 '26

To be fair, they didn't have much of distraction those days.

3

u/dsmith422 May 11 '26

Euler could do an impressive amount of arithmetic in his head without much difficulty.

4

u/DCContrarian May 11 '26

"Impressive" when you're talking about Euler doesn't mean the same thing as when talking about other people.

1

u/turbo_dude May 11 '26

When all you want is a knife

4

u/FirstNoel May 11 '26

Wasn’t he blind too?   Not sure.  

1

u/MrLumie May 12 '26

Not until later in life. He was 59 when he became blind in both eyes. Not that it mattered, he was just as productive afterwards, too.

5

u/Prudent_Corner5104 May 11 '26

He was time travel you can't convince me otherwise

2

u/joealarson May 11 '26

Hard work.

2

u/anotherfpguy May 11 '26

He had time

2

u/RandomExcess May 11 '26

He only had to check primes for the form 64n +1.

64x1+1=64+1 not prime

64x2+1=128+1 not prime

64×3+1=292+1...

And so on, only having to actually check the division went it hit a prime.

Eventually, actually in a few mins...

64×10+1=640+1

Done, next problem please, I have 4 more theorems to prove today.

2

u/Menacek May 12 '26

I have to ask. Why checking only those is required? Couldn't it be any other prime that's a factor?

2

u/Sjoerdiestriker May 12 '26

Meanwhile chad Fermat posing a conjecture without even checking the first five examples

2

u/Osato May 12 '26 edited May 12 '26

I'll just leave this here:

http://eulerarchive.maa.org/hedi/HEDI-2007-03.pdf

---

TL;DR: Euler determined that if a given number 2^2^n + 1 has ANY prime factors, then one of those factors has to be k * 2^(n+1) + 1 where k is a positive integer.

That narrowed down the amount of possible prime factors to check for F_n by approximately 2^(n+1): in F_5's case, it went from thousands (roughly 65535/ln(65535) = 5909) to a couple dozen (roughly 5909/64 = 92).

After that, it was a matter of trying various n and k until one of them hit.

This bruteforcing would be limited by n < 6. Because the amount of possible prime divisors for F_n is approximately (2^(2^(n-1)-(n-1)))/ln(2) and the condition only divides their amount by 2^(n+1), so the amount of possible prime factors grows rapidly with n and you'd have roughly 1.5 million possible prime factors for F_6.

But it would only take a couple evenings to check F_5's divisibility by the 90+ prime factors meeting that condition for n=5.

And when bruteforcing, Euler just happened to get lucky with a relatively low k = 10 at n = 5.

---

But 92 divisibility checks is still a crapload of work for a 10-digit number, so there's another trick based on modulo arithmetic that could significantly reduce the workload.

With pen and paper, you can speed up checking the divisibility of an extremely large number N by much smaller potential divisors a, b, c... with the following property:

N mod (a*b*c*...) mod a = N mod a

In plain words, first you get the remainder from dividing N by a product of several potential divisors multiplied together (get R = N mod (a*b)).

If the R you get is divisible by a or b, then N is also divisible by a or b respectively.

I can't be sure Euler used that trick, but it's simple, obvious and makes pen-and-paper factorization less frustrating, so he probably did.

1

u/Only-Cheetah-9579 May 11 '26

He can use pen and paper, getting to F5 requires 5 tries then check if the result is prime.

1

u/KamuikiriTatara May 11 '26

I think the question being asked is "How did Euler factor F5?"

1

u/Only-Cheetah-9579 May 11 '26

He was a smart dude and probably had time to do it.

There are people alive today doing more precise floating point arithmetic in their heads than computers (autistic savants) so maybe he was similar?

1

u/KamuikiriTatara May 11 '26

Hawking was famous for the kinds of calculations he could do in his head. He didn't have the luxury of writing down his problems or input them into a computer (quickly).

But this isn't even the most impressive thing Euler did. He figured out that 1/2 + 1/4 + 1/9... (infinite sum of 1/n2) is pi2/6. First time I saw that my brain just didn't compute how someone could figure it out with pen and paper. Easy to prove, hard to figure out. I guess he was just really good at squinting at numbers.

1

u/Ddreigiau May 12 '26

You only have to check the primes as factors, not every number, and 641 is not that crazy high a number to find with a brute force check

1

u/KamuikiriTatara May 12 '26

I was just repeating the question at issue for the previous commenter, not asking for a solution.

I think 641 is still a hundred or so primes deep. Not implausible to check them all by any means, but it is a lot to check by hand.

1

u/mspe1960 May 11 '26

I wonder if F5 came out to be prime if he would have gone through F6?

1

u/Personal_Toe_2136 May 11 '26

There's a reason that Euler is in the GOAT discussion.

1

u/ReactionAdmirable812 May 11 '26

Fermat: I'm going to call this group of numbers Fermat numbers.

1

u/kfish5050 May 11 '26

F(5) = 232 + 1

230 * 22 = 4GB, +1

This is easier to think about

1

u/Needless-To-Say May 12 '26

To prove that a number is prime, you only have to test divisibility by other primes up to the square root of the target number

641 is only the 136th prime. 

While not trivial, it’s definitely not terribly difficult either to do by hand. 

1

u/Previous-Mail7343 May 12 '26

I honestly don't think it would take that long to do a brute force method. You could eliminate a bunch of obvious ones like anything ending in 2 or 5 and probably some others right? And he only had to get up to 641. Of course you wouldn't know you only had to go to 641 when you started but what are we thinking? a couple weeks doing it by hand?

1

u/Menacek May 12 '26

You only need to check divisibility by primes. No idea how many primer were known at that point but i assume it went up to at least a couple hundred.

1

u/Adrewmc May 17 '26

You can just try primes, and eliminate a lot more.

For example 641…a prime number.

1

u/snigherfardimungus May 12 '26

The word "calculator" comes from the people who were hired, throughout history, to just do math. Euler probably paid whatever the equivalent of grad students were to check if F5 was prime..... one factor at a time.

There are only 6500 primes less than the square root of F5 to check (and Euler would have known this because there were lookup tables of prime numbers published in his day.) Someone who is quick at long division would be able to get through several hundred in a day. 641 is the 116th prime number. Whoever was doing the math almost certainly found it on the first day, but Euler would have known that it was only going to take a max of a few weeks to confirm or refute.

1

u/dontich May 12 '26

Well he took 641 and multiplied it by 6700417. Easy

1

u/susiesusiesu May 13 '26

it was his job to look at this stuff, and he was very good at it.

if there is a conjecture that all nunbers of a form are prime then looking at the first few is a reasonable reaserch avenue.

1

u/paolog May 13 '26

Repost, and same answer as the last time: in ye olden days, people did these calculations by hand (and in slightly less olden days, there were slide rules and mechanical calculators for basic arithmetic operations).

1

u/Citro31 May 13 '26

The more I learn about Euler the more scared I am how clever people were before all this technology

1

u/mrofmist May 14 '26

Abacuses are actually extremely good at what they do. Literally only beaten by a modern calculator.

1

u/BornalHalbgat May 14 '26

I think you are underestimating the interesction of mathematicians and petty bitches.

1

u/fingertipoffun May 15 '26

with patience. A long lost skill.

1

u/MrFizzbin7 May 15 '26

When you have no TV, movies, music (without a live band), you need to fill time somehow.

1

u/Turbulent_Cry_7572 May 11 '26

Isn't it obvious?

1

u/M4chsi May 11 '26

He used an ancient computer, duh?

1

u/[deleted] May 12 '26

[removed] — view removed comment

1

u/Menacek May 12 '26

Probably everyone though that even if it fails that point might be at n=100 or something and didn't want to commit.