I recently was passing some time on Project Euler, when I came across this question. It deals with finding Pentagonal Numbers $P_j$ and $P_k$ such that $P_j+P_k$ and $P_j-P_k$ are also pentagonal numbers and $P_j-P_k$ is minimized. Without loss of generality, I am simply going to say that $j>k$ for the sake of solving the problem.

If you are not familiar with Project Euler, the idea of the site is to provide mathematical problems that can be solved with simple programs. It provides very good exercises in computer science and algorithms.

I noticed that some problems on the site can easily be solved with pen and paper (no "brute force" calculations needed). I feel as though this problem (though perhaps not as easily as some) can be solved by hand, although I keep hitting dead ends.

I have started with what I know: There are multiple (perhaps even infinitely many) solutions $j,k,n_1,n_2$ to the following:

\begin{align} P_j + P_k &= P_{n_1}\\ P_j - P_k &= P_{n_2} \end{align}

I want to relate these variables in a way such that I can find a class of solutions to this problem. Then, from there it should be easy to find the solution such that $P_j-P_k$ is minimized.

Using the relations described above and using the formula for a pentagonal number, I arrive at the following:

\begin{align} 3j^2 - j + 3k^2 - k &= 3n_1^2 - n_1\\ 3j^2 - j - 3k^2 + k &= 3n_2^2 - n_2 \end{align}

From here, I am unable to progress in any beneficial way. It seems that I hit a dead end no matter where I go from here. Any help is appreciated, thanks!

EDIT: I am looking for a solution. I simply do not have the proper background in number theory to elaborate on what these hints may be telling me to do. Nevertheless, I am really intrigued by how I could solve this.

Please provide or help me to come up with a specific way of solving this problem. Thanks!

  • 1
    $\begingroup$ It curves triangular number. The General formula can be viewed there. math.stackexchange.com/questions/794510/… Formula can be written using the equations Pell. You can record and without this equation. $\endgroup$ – individ Aug 26 '15 at 15:51
  • $\begingroup$ What are the solutions you have found so far? $\endgroup$ – gonthalo Aug 30 '15 at 12:09
  • $\begingroup$ The problems in Project Euler are not intended for you to ask for solutions. $\endgroup$ – Mariano Suárez-Álvarez Aug 31 '15 at 8:59
  • 3
    $\begingroup$ I already have a solution written in code, as intended. I am seeking a purely mathematical solution, which is clearly a different goal. $\endgroup$ – user134593 Sep 1 '15 at 0:32
  • $\begingroup$ A vote up for your question $\endgroup$ – user243301 Sep 4 '15 at 18:48

Hint: If you want to focus on finding the minimal difference pentagonal number, let $Q_j = P_j - P_k$ and $Q_k = P_k$. Then you want to find minimal $j$ for two pentagonal numbers $Q_j$ and $Q_k$ so that $Q_j + Q_k = P_j$ is pentagonal and also $Q_j + 2Q_k = P_j + P_k$ is pentagonal. The choice of $Q_k = P_k$ is irrelevant, you just need $Q_j,Q_j+Q_k,Q_j + 2 Q_k$ are all pentagonal for given smallest possible pentagonal $Q_j$. For a given choice of $Q_j$ you should be able to lower and upper bound the possibilities for $Q_k$ (using the formula for pentagonal numbers, and the fact that you want $3$ pentagonal numbers in an arithmetic progression) which in turn will give you bounds on $k$ to check. You may even be able to narrow it down to one value of $k$ to check, which would make your program very fast as long as the minimal $j$ for this problem is not too big.


So it is easier to solve the system of equations is presented in this form.


Then the solution can be written as.






$a,b,c - $ Any integers.

Then just. Solve the equation. $q=6$

Solve and then substitute to find out whether there is such $a,b,c$ That at the same time $x,y,z,f $ it is divisible by 6.

Although I think that no such numbers.

The solution can be written in this form.







Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy