4. Find the largest natural number $n$ such that the value of the sum

$$
\lfloor\sqrt{1}\rfloor+\lfloor\sqrt{2}\rfloor+\lfloor\sqrt{3}\rfloor+\ldots+\lfloor\sqrt{n}\rfloor
$$

is a prime number. The notation $\lfloor x\rfloor$ denotes the greatest integer not greater than $x$.
SOLUTION. Consider the infinite sequence $\left(a_{n}\right)_{n=1}^{\infty}$ of natural numbers $a_{n}=\lfloor\sqrt{n}\rfloor$. This sequence is clearly non-decreasing, and since

$$
k=\sqrt{k^{2}}6$ the value of the fraction

$$
\frac{(k-1) k(4 k+1)}{6}
$$

remains a natural number even after canceling out six by a natural number divisible by some prime factor $p$ of the number $k$, which naturally divides another addend in the derived expression for the sum $s_{n}$. The prime number $p$ will thus be a divisor of the number $s_{n}$, with $p \leqq k<s_{n}$, so the number $s_{n}$ cannot be a prime. Therefore, the solution to the given problem only needs to be sought among such natural numbers $n$ for which $k=\lfloor\sqrt{n}\rfloor \leqq 6$, hence only numbers $n<(6+1)^{2}=49$ remain in play. For $n=48$, substituting into the derived formula for $s_{n}$ we calculate $s_{48}=203$, which is a number divisible by seven. For $n=47$, we get $s_{47}=197$, which is a prime number.

Answer. The sought number is $n=47$.

SUPPLEMENTARY AND ADDITIONAL PROBLEMS:

N1. Prove that $1+3+5+\ldots+(2 n-1)=n^{2}$.

N2. Prove that $1^{2}+2^{2}+\ldots+n^{2}=\frac{1}{6} n(n+1)(2 n+1)$.

N3. Determine how many integer solutions the equation

![](https://cdn.mathpix.com/cropped/2024_04_17_bd202734538ab0b74df6g-07.jpg?height=113&width=943&top_left_y=846&top_left_x=682)

$[38-\mathrm{B}-\mathrm{II}-4]$

D1. Prove that for every natural number $n \geqq 2$ the following holds:

$$
\lfloor\sqrt{n}\rfloor+\lfloor\sqrt[3]{n}\rfloor+\ldots+\lfloor\sqrt[n]{n}\rfloor=\left\lfloor\log _{2} n\right\rfloor+\left\lfloor\log _{3} n\right\rfloor+\ldots+\left\lfloor\log _{n} n\right\rfloor
$$

[Fill an $n \times n$ table with numbers such that the cell in the $a$-th row and $b$-th column contains the number $a^{b}$, and count the number of cells where the number does not exceed $n$ in two ways: by columns and by rows.]