Factorials/102

What is the remainder when 1 ! + 2 ! + 3 ! + 4 ! + 5 ! + + 100 ! 1!+2!+3!+4!+5!+\cdots+100! is divided by 102 102 ?


The answer is 63.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Chew-Seong Cheong
Aug 14, 2020

Since 102 = 2 × 3 × 17 102 = 2 \times 3 \times 17 , n ! m o d 102 = 0 n! \bmod 102 = 0 for all n 17 n \ge 17 . Therefore we have:

n = 1 100 n ! 1 ! + 2 ! + 3 ! + 4 ! + 5 ! + + 16 ! (mod 102) = 1 + 2 + 6 + 24 + ( 4 ! ) 5 + + 16 ! (mod 102) = 33 + ( 24 ) 5 + ( 5 ! ) 6 + + 16 ! (mod 102) = 33 + 18 + ( 18 ) 6 + + 16 ! (mod 102) = 51 + 6 + ( 6 ) 7 + + 16 ! (mod 102) = 57 + 42 + ( 42 ) 8 + + 16 ! (mod 102) = 99 + 30 + ( 30 ) 9 + + 16 ! (mod 102) = 27 + 66 + ( 66 ) 10 + + 16 ! (mod 102) = 93 + 48 + ( 48 ) 11 + + 16 ! (mod 102) = 39 + 18 + ( 18 ) 12 + + 16 ! (mod 102) = 57 + 12 + ( 12 ) 13 + 14 ! + 15 ! + 16 ! (mod 102) = 69 + 54 + ( 54 ) 14 + 15 ! + 16 ! (mod 102) = 21 + 42 + ( 42 ) 15 + 16 ! (mod 102) = 81 + 84 (mod 102) = 63 (mod 102) \begin{aligned} \sum_{n=1}^{100} n! & \equiv 1! + 2! + 3! + 4! + 5! + \cdots + 16! \text{ (mod 102)} \\ & = 1 + 2 + 6 + 24 + (4!)5 + \cdots + 16! \text{ (mod 102)} \\ & = 33+ (24)5 + (5!)6 + \cdots + 16! \text{ (mod 102)} \\ & = 33+ 18 + (18)6 + \cdots + 16! \text{ (mod 102)} \\ & = 51 + 6 + (6)7 + \cdots + 16! \text{ (mod 102)} \\ & = 57 + 42 + (42)8 + \cdots + 16! \text{ (mod 102)} \\ & = 99 + 30 + (30)9 + \cdots + 16! \text{ (mod 102)} \\ & = 27 + 66 + (66)10 + \cdots + 16! \text{ (mod 102)} \\ & = 93 + 48 + (48)11 + \cdots + 16! \text{ (mod 102)} \\ & = 39 + 18 + (18)12 + \cdots + 16! \text{ (mod 102)} \\ & = 57 + 12 + (12)13 + 14! + 15! + 16! \text{ (mod 102)} \\ & = 69 + 54 + (54)14 + 15! + 16! \text{ (mod 102)} \\ & = 21 + 42 + (42)15 + 16! \text{ (mod 102)} \\ & = 81 + 84 \text{ (mod 102)} \\ & = \boxed{63} \text{ (mod 102)} \end{aligned}

102 2 51 3 17 17 1 \begin{array}{r|l} 102&2\\ 51&3\\ 17&17\\ 1 \end{array}

Therefore after 16 each factorials will be divisible by 102.

Let's start to calculate the remainder for each factorials: number calculation remainder 1 1 2 1 × 2 2 3 2 × 3 6 4 6 × 4 24 5 24 × 5 ( m o d 102 ) 18 6 18 × 6 108 \begin{array}{c|c|c} \text{number}&\text{calculation}&\text{remainder}\\ \hline 1&1\\ 2&1\times2&2\\ 3&2\times3&6\\ 4&6\times4&24\\ 5&24\times5\pmod{102}&18\\ 6&18\times6&108\\ \vdots \end{array} If you continue that: n = 1 16 n ! ( m o d 102 ) = 63 \displaystyle \sum_{n=1}^{16}n!\pmod{102}=63

can you explain mod

SRIJAN Singh - 10 months ago

Log in to reply

What should I explain? What is mod?

Log in to reply

yes a little about mod

SRIJAN Singh - 10 months ago

Log in to reply

@Srijan Singh Mod means remainder. a mod b means that if we divide a with b, then we will get a mod b as remainder. link or

Hey! Is there any good way instead of just summing till 16 ! \boxed{16!} ? (boxed to show not an exclamation)

Vinayak Srivastava - 10 months ago

Log in to reply

yah! i also want a good way

SRIJAN Singh - 10 months ago

Hmmm.... There is a way. 21.5% to get the correct answer :)

Log in to reply

hey explain this

SRIJAN Singh - 10 months ago

Srijan, there is no other easy non-numerical method.

Chew-Seong Cheong - 10 months ago

Log in to reply

sir can you give the solution for this

SRIJAN Singh - 10 months ago
Srijan Singh
Aug 13, 2020

anyone please write the solution

1
2
3
4
5
6
7
#Calculated 1 to 100 factorial sum on google
fac = 94269001683709979260859834124473539872070722613982672442938359305624678223479506023400294093599136466986609124347432647622826870038220556442336528920420940313

#Printing the answer, using mod 102
print ("The answer is : ",end="") 

print (fac % 102)

The answer is : 63

This is my first Python program I made on my own, and I don't know anything about Python!

Log in to reply

@Páll Márton - Is my Python correct? I'm a JS(OOP, SQL) programmer so I dunno a single thing about Python :)

Log in to reply

I'm a python programmer .from my side it is correct but you calculated the sum of factorial from google.

SRIJAN Singh - 10 months ago

It is correct.

Log in to reply

@A Former Brilliant Member how do you solve

SRIJAN Singh - 10 months ago

Log in to reply

@Srijan Singh Much like pall marton.

Your code is correct

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...