# Another special number(s): Wilson primes and playful programming!

Problem:

A prime number p is called a Wilson prime if $(p-1)! \equiv -1 \pmod {p^{2}}$. Using a computer and some programming language like C, C++, or Python find the three smallest Wilson primes.

Cheers,

Nalin Pithwa.

# A Special Number

Problem:

Show that for each positive integer n equal to twice a triangular number, the corresponding expression $\sqrt{n+\sqrt{n+\sqrt{n+ \sqrt{n+\ldots}}}}$ represents an integer.

Solution:

Let n be such an integer, then there exists a positive integer m such that $n=(m-1)m=m^{2}-m$. We then have $n+m=m^{2}$ so that we have successively

$\sqrt{n+m}=m$; $\sqrt{n + \sqrt{n+m}}=m$; $\sqrt{n+\sqrt{n+\sqrt{n+m}}}=m$ and so on. It follows that

$\sqrt{n+\sqrt{n+\sqrt{n+ \sqrt{n+\ldots}}}}=m$, as required.

Comment: you have to be a bit aware of properties of triangular numbers.

Reference:

1001 Problems in Classical Number Theory by Jean-Marie De Koninck and Armel Mercier, AMS (American Mathematical Society), Indian Edition: