MathDB
Problems
Contests
National and Regional Contests
Canada Contests
Canadian Open Math Challenge
2024 Canadian Open Math Challenge
B1
B1
Part of
2024 Canadian Open Math Challenge
Problems
(1)
2024 COMC B1
Source:
11/4/2024
For any positive integer number
k
k
k
, the factorial
k
!
k!
k
!
is defined as a product of all integers between
1
1
1
and
k
k
k
inclusive:
k
!
=
k
×
(
k
−
1
)
×
⋯
×
1
k!=k\times{(k-1)}\times\dots\times{1}
k
!
=
k
×
(
k
−
1
)
×
⋯
×
1
. Let
s
(
n
)
s(n)
s
(
n
)
denote the sum of the first
n
n
n
factorials, i.e.
s
(
n
)
=
n
×
(
n
−
1
)
×
⋯
×
1
⏟
n
!
+
(
n
−
1
)
×
(
n
−
2
)
×
⋯
×
1
⏟
(
n
−
1
)
!
+
⋯
+
2
×
1
⏟
2
!
+
1
⏟
1
!
s(n)=\underbrace{n\times{(n-1)}\times\dots\times{1}}_{n!}+\underbrace{(n-1)\times{(n-2)}\times\dots\times{1}}_{(n-1)!}+\cdots +\underbrace{2\times{1}}_{2!}+\underbrace{1}_{1!}
s
(
n
)
=
n
!
n
×
(
n
−
1
)
×
⋯
×
1
+
(
n
−
1
)!
(
n
−
1
)
×
(
n
−
2
)
×
⋯
×
1
+
⋯
+
2
!
2
×
1
+
1
!
1
Find the remainder when
s
(
2024
)
s(2024)
s
(
2024
)
is divided by
8
8
8
Comc