Practice (106)

back to index  |  new

Show there exist infinite many primes in the form of $(4k+1)$ where $k$ is a positive integer.

$\textbf{Prisoners' Problem}$

One hundred prisoners will be lined up. Each one will be assigned either a red hat or a blue hat. No one can see the color of his or her own hat. However, each person is able to see the color of the hat worn by every person in front of him or her. That is, for example, the last person in line can see the colors of the hats on $99$ people in front of him or her; and the first person, who is at the front of the line, cannot see the color of any hat. Beginning with the last person in line, and then moving to the $99^{th}$ person, the $98^{th}$, etc., each will be asked to name the color of his or her own hat. He or she can only answer "red" or "blue". If the color is correctly named, the person lives; if not, the person is shot dead on the spot. Everyone in line is able to hear all the responses but not the gunshots. Before being lined up, the $100$ prisoners are allowed to discuss a strategy aiming to save as many of them as possible. How many people can be saved if they can agree on a good strategy?

As a more challenging question, what if the hats can have $100$ known different colors instead of $2$?


Does there exist a polynomial $P(x)$ such that $P(1)=2015$ and $P(2015)=2016$?

Find the least positive integer $n$ such that when $3^n$ is written in base $143$, its two right-most digits in base $143$ are $01$.


Show that if $n^2$ is a square number, then $n^2\equiv 0, 1, 4, 9\pmod{16}$.

In plain English, this means that the remainder can only be $0$, $1$, $4$ or $9$ when a square number is divided by $16$.


Find, with proof, all pairs of positive integers $(n, d)$ with the following property: for every integer $S$, there exists a unique non-decreasing sequence of n integers $a_1$, $a_2$, $\cdots$, $a_n$ such that $a_1 + a_2 + \cdots + a_n = S$ and $a_n-a_1 = d$.


A person eats $X ( > 1)$ cookies in $N$ days in the following way:

  • He eats $1$ plus $1/7$ of the remaining cookies on the $1^{st}$ day 
  • He eats $2$ plus $1/7$ of the remaining cookies on the $2^{nd}$ day
  • $\cdots$
  • Finally, he eats the last $N$ cookies on the $N^{th}$ day

What is the smallest possible value of $X$?


What is the tens digit of $321^{123}$?

Find the last two digits of $123^{321}$.

Determine the last two digits of $312^{123}$.

Let $n$ be any positive integer, show that $$(5n+1)(5n+2)(5n+3)(5n+4)\equiv -1 \pmod{25}$$


Compute $3^{2018} \mod{17}$.


Compute $\underbrace{3^{3^{3^{\cdots^{3}}}}}_{2012\ times}\pmod{100}$.


Solve $15x\equiv 7\pmod{32}$.


Solve $x^{12}\equiv 3\pmod{11}$.


Show that $x^5\equiv 3\pmod{11}$ is not solvable.


Find one solution to $x^7\equiv 3\pmod{11}$.


Show that $(2^{1194} + 1)$ is a multiple of $65$.


Solve $x^{22} + x^{11}\equiv 2\pmod{11}$.


Compute $20!\pmod{23}$.


Let $p$ be a prime and integer $a$ is co-prime to $p$, show that $$a^{p(p-1)}\equiv 1\pmod{p^2}$$


Let $p$ and $q$ be two distinct primes, and integer $a$ is co-prime to both $p$ and $q$, show $$a^{(p-1)(q-1)}\equiv 1\pmod{pq}$$


Let $p$ be an odd prime. Show that $$\sum_{j=0}^p\binom{p}{j}\binom{p+j}{j}\equiv 2^p +1 \pmod{p^2}$$


Given $30!$ ends with some zeros, what is the digit that immediately precedes these zeros?


The two-digit integers from $19$ to $92$ are written consecutively to form the large integer $$N=192021\cdots 909192$$

Suppose that the $3^k$ is the highest power of $3$ that is a factor of $N$. What is $k$.