A questionable factorial problem
Вставка
- Опубліковано 8 лют 2025
- 🌟Support the channel🌟
Patreon: / michaelpennmath
Channel Membership: / @michaelpennmath
Merch: teespring.com/...
My amazon shop: www.amazon.com...
🟢 Discord: / discord
🌟my other channels🌟
mathmajor: / @mathmajor
pennpav podcast: / @thepennpavpodcast7878
🌟My Links🌟
Personal Website: www.michael-pen...
Instagram: / melp2718
Twitter: / michaelpennmath
Randolph College Math: www.randolphcol...
Research Gate profile: www.researchga...
Google Scholar profile: scholar.google...
🌟How I make Thumbnails🌟
Canva: partner.canva....
Color Pallet: coolors.co/?re...
🌟Suggest a problem🌟
forms.gle/ea7P...
Maybe this problem statement would be clearer if it said "2500th digit from the right"?
Michael is from the little-endian gang 😂
Maybe 10000! has 4999 digits
I guess there wasn't a good place to stop.
Really cool problem and solution. Love it.
We have different definitions of what the nth digit is! I count from the left to the right (from highest to lowest power of the base)!
"what is the first nonzero digit of: 10,000!" isn't any better! That should be the LAST nonzero digit from the left.
Thats cause youre wrong lol
@@guilhermebacellar8161 I'm not from far east or middle east, so no, I read from left to right, and thus first is left, last is right, and you are dead wrong!
@rainerzufall42 Bro neither am I.
But is pretty much common sense, om maths, that when talking about digits, we talk from right to left, and it is taught in pre school where I live (Brazil)
@@guilhermebacellar8161so do you say for example 5863 as "three sixty eight hundred five thousand"?
Factorials can be tricky, but this video turned the confusion into clarity. The way the problem was approached was genius. Also with the help of SolutionInn, math problems don’t seem so daunting anymore!
I’d read the Q as posed as counting from the left, and would explicitly state in the problem that it’s the 2500th from the right that’s needed. Obviously counting from left is much harder as it’s not going to be easy to calculate the length of 10,000!
It's not as difficult as you might think. Stirling's formula gives a surprisingly accurate approximation to ln(n!). There is an infinite series that can be used to correct that estimate. I don't have time right now to determine how many terms of that series would be needed to estimate ln(10000!)/ln(10) with sufficient accuracy to determine the number of digits, but it shouldn't be a lot. Wikipedia's article on Factorials says that 10000! is approximately 2.846259681×10^35659.
@ maybe. Strikes methanol could become digital too much or too little with an approximation like that. At the very least you have to be more careful. No such worries counting from the right.
@@gavintillman1884Was "Strikes methanol" intended to be "Stirling's method"?
I agree that the 2500th digit from the right is a lot easier than from the left. I was just pointing out that determining the number of digits, while difficult, is a lot easier than you might think.
@@jameskuyper ah that's quite an autocorrect fail on my part. I'm trying to remember what I was trying to say. I think the essence of it is that for continuous measures of nearness, Stirling is great - variation between Stirling and true calculation clearly gets smaller and smaller as a % - but not so sure for discrete measures of nearness - I can imagine that Stirling could easily have one more of fewer digits thatn the true calcuation.
@@gavintillman1884 I finally had time to check the actual numbers. Stirling's formula gives log10(10000!) = 35659.45, which implies that 10000! has 35660 digits. The leading correction is ln(1 + 1/(12×n))/ln(10), which is 3.6×10^-6, and all of the other corrections are even smaller, so they won't change the number of digits. This matches the result I already quoted.
Using Stirling's formula to determine the value of 2500th digit from the left would be much more difficult, but it is more than sufficient to simply determine the number of the digits.
There was no good place to stop??
And that's a good place to stop.
Off topic kinda but I noticed a pretty quick way to calculate successive powers of 5^n after n>2. From the right most digit to left. You just group by two digits, take half that value (floored), write down the ones place, and the leftmost digit will always be full value. Of course, the rightmost value is always 5.
Example: 5^3
If 5^2 = 25
5, 25/2 = 12(floor), 125
You, multiplying by 5 is the same as multiplying by 10 (i.e. adding a zero) and dividing by 2. Indeed.
@@Unordinary-lg4yt what you discovered is a known application of the floor function that appears in sections or HW problem in some number theory textbooks.
Nice job figuring it out on your own!
Assuming that my calculator and my counting are correct: the 2500th digit from the left is a 9. We computed the 33161 digit from the left. The 2025th digit from the left is a 4.
Where can i read those maths magazines .. do i need to pay for theme ?
Michael, love the videos. This is not a complaint but a suggestion. If you've already made videos explaining the theorems you use, could you please add them in the description or perhaps just reference what the theorems are called so we can look them up. I'm not well versed in all the number theory you make very good use of and it would be excellent if you told us that the proof could be found in name_of_video_in_the_number_theory_playlist. The reason I request this is that I was pretty much with you up until around 17:50 where I ultimately lost the plot ("multiply both sides by the inverse of 3..."). It was super frustrating because it was on the home stretch. I don't want this to sound like a complaint because I am super grateful for every video you make even if some go far over my head. Thank you so much for the content you provide. I wish you and everybody who bothered reading this far a very happy new year.
In modular arithmetic you can't 'divide' in the normal way, so to cancel the three we need to multiply both sides by some number which is allowed.
The 'inverse' of a number modulo n is a number where if you multiply them together you get 1 in that modulus. Here 3*2 = 6 which is congruent to 1 mod 5.
In prime moduluses (real word??) you always have such an inverse.
After you multiply both sides by three the LHS is 6N which is congruent to N mod 5
"moduli" 😉
@@krabbediem it does sound a little like a complaint since the time you took to ask about multiplicative inverses could have been used to look up the topic in a number theory textbook
U are my true Prof!
Note that the value of n is never explicitly stated (it is actually 8)
Not to be confused with the question-mark function, which relates binary and continued-fraction representations of real numbers.
I was so tired, I thought he was so excited about the number 10,000. And was confused about it only having the 5 digits
15:20 I guess there shouldn't be a 10000
Correct. That's a chalko.
Same goes for 14:34
10000? is the same thing as 9999?, right?
Very Nice!
So really the question should be asking what digit is in the 10²⁴⁹⁹ place value of 10 000!
I got 2 😢
Cinematic intro
Professor could u give any hint to prove the fact on the left part of the blackboard 5:27 ?
Just for curiosity, has this fact any meaning from the group's theory pov in terms of p-Sylow groups?
Yes, it tells you the size of the p-Sylow subgroup inside S_n. But you can do better and describe exactly what the p-Sylow subgroup is: it’s the permutations that preserve the nested lists
{{…{1, 2, … p}, {p+1, p+2, … 2p}, … {p^2-p+1, … p^2}}, {{p^2+1, … p^2+p}, {p^2+p+1, … p^2+2p}, …}}
In other words, group all numbers that have the same digits except the 1’s digit (assuming we’re permuting [0, 1, … n-1] unlike above); then group the groups that have the same digits up to the p’s digit, then p^2 digit, etc. There is a p-Sylow subgroup that preserves this nested grouping (with ordering preserved as well).
For example, the 2-Sylow subgroup of S_10 is the permutations preserving {{{{0,1},{2,3}},{{4,5},{6,7}}},{{{8,9}}}}. It’s of size 256, but it’s generated by (01), (23), (45), (67), (89), (02)(13), (46)(57), (04)(15)(26)(37).
Can’t you just use the theorem that the rightmost nonzero digit of n! is given by 2^(m/4) mod 10 where m is given by writing n in base 5, adding to n all the even digits of such a representation, and subtracting all odd digits? Here, 10000 in base 5 is 310000, so m=10000 - 3 - 1 + 0 + 0 + 0 + 0 = 9996, so the last digit is 2^(9996/4)=2^(2499) = 8 mod 10? Seems much easier 🤔
That is a lemma at best 😉
Bravo! Nice problem and solution.
New Year's resolution; learn more Number Theory
I did the following mental maths. Number of 0s is 2000 + 400 + 80 + 16 + 3 - adds up to 2499. So 2500 is the last non zero digit as advertized.
Did the math for the last digit of 10! by skipping 2 and 5 - and keeping only the last digit (i.e. Mod 10). 3*4 = 2, * 6 = 2, * 7 = 4, * 8 = 2, * 9 = 8. This is exactly what every set of 10 would yield if you only kept the last digits for each multiplication
Then I calculated powers of 8 (again mod 10) to figure out that 8^5 = 8 (again mod 10). So 8^1000 is 8, which is the answer. Arrived without using a pen or paper.
Then I skipped to the end of the video to check if I did one of my silly mistakes that I am very good at.
I like the formal derivation in the video as that process is more generalized. But I also like my shortcut for this specific problem :-)
but you don’t use every 2 up when you form all the tens in the number, and thus their must be some twos you didn’t factor into your calculation, or over factored.
@@yashgupta597You are right. I need to take away 499 of the 2s to cover the remaining powers of 5 (400+80+16+3). Again, 2^5=2 mod 10, and can be easily calculated to be 2^499 = 6 mod 10. Taking that away from 8 in my previous post leaves us again with an 8 (mod 10).
Careful, since 8^1,000 is 6 modulo 10. (Because the powers of 8 mod 10 are 8, 4, 2, 6 and 1,000 is 0 modulo 4.) So, do you know why is the answer not 6?
I can find the last digit. It's 0.
goty
My goodness
My goodness indeed 😢
Dr. Penn, you should have asked the 2025th digit from the left… Anyway, not a good place to stop
It would be 0, as shown. It would be an easy question
Edit: now the guy added "from the left" in his comment so now my answer does not make sense anymore. His original comment was just "2025th digit"
He is not "Bro." He is Dr. Penn, or at least Michael.
@@robertveith6383what is this bro yapping about, chat?💀
@@gnieduyes but the 2025th from the left?
@@levars1 Nah tbh I think he’s right. I was too chill 😂
I think the answer is 2. Let me explain.
Define the function f(n) to be the first non-zero digit of n (when starting from the right). Furthermore, let n div 10 and n mod 10 denote the usual division and remainder by 10.
It can easily be shown that:
1. f(n*m)=f(n)*f(m) mod 10, so especially f(10n)=f(n)
2. If n mod 10 0 then f(n*m)=f((n mod 10)*m)
Now consider f((10^n)!). We split all numbers 1,2,3,...10^n in two sets, the numbers m for which m mod 10 0 and == 0, respectively. Then using 1. and 2. we find that (with everything mod 10)
f((10^n)!)=f(1*2*...*9)*f(11*12*...*19)*...*f((10^n-9)*(10^n-8)*...*(10^n-1))*f(10*20*...*10^n)=(f(9!)^(10^(n-1))*f((10^(n-1))!)
So f(10!)=(f(9!)^1)*f(1!), f(100!)=(f(9!)^10))*f(10!), f(1000!)=(f(9!)^100)*f(100!) and f(10000!)=(f(9!)^1000)*f(1000!)
Combining these gives f(1000!)=f(9!)^1111 and since f(9!)=f(1*2*5)*f(3*4)*f(6*7)*f(8*9)=1*2*2*2=8 we get f(1000!)=8^1111=8^(1111 mod 4)=8^3=2
Ah, my reasoning is not correct. I missed that things change when numbers ending in 5 are multiplied by numbers ending in 2. So e.g. f(12*15) f(12)*f(15)...