Maths Olympiad Prep

Library / /1 of 20

Number theory Difficulty 6.0 National olympiad Find the answer

Find all pairs (n,p)(n, p) of positive integers such that pp is prime and
1+2++n=3(12+22++p2). 1 + 2 + \cdots + n = 3 \cdot (1^2 + 2^2 + \cdot + p^2).

A number or a short expression. Spacing and $ signs are ignored.

Solution

To find all pairs (n,p)(n, p) of positive integers such that p p is prime and:

1+2++n=3(12+22++p2) 1 + 2 + \cdots + n = 3 \cdot (1^2 + 2^2 + \cdots + p^2)

we first express these sums using known formulas:

1. The sum of the first n n positive integers is given by:
n(n+1)2 \frac{n(n + 1)}{2}

2. The sum of the squares of the first p p positive integers is given by:
p(p+1)(2p+1)6 \frac{p(p + 1)(2p + 1)}{6}

Substituting these into the equation, we have:

n(n+1)2=3p(p+1)(2p+1)6 \frac{n(n + 1)}{2} = 3 \cdot \frac{p(p + 1)(2p + 1)}{6}

Simplifying the right-hand side:

n(n+1)2=p(p+1)(2p+1)2 \frac{n(n + 1)}{2} = \frac{p(p + 1)(2p + 1)}{2}

Thus, we have:

n(n+1)=p(p+1)(2p+1) n(n + 1) = p(p + 1)(2p + 1)

Now, let's solve for (n,p) (n, p) . We test small values for p p since p p is a prime number.

- **Case p=2 p = 2 :**

p(p+1)(2p+1)=235=30 p(p + 1)(2p + 1) = 2 \cdot 3 \cdot 5 = 30

We need:

n(n+1)=30 n(n + 1) = 30

Testing integers for n n :

- n=5 n = 5 gives n(n+1)=56=30 n(n + 1) = 5 \cdot 6 = 30

This is a valid solution: (n,p)=(5,2)(n, p) = (5, 2).

For larger prime numbers, the product p(p+1)(2p+1) p(p + 1)(2p + 1) grows quickly, making n(n+1)=p(p+1)(2p+1) n(n + 1) = p(p + 1)(2p + 1) impractical for small n n . Therefore, no other small primes will provide solutions where n n is a reasonable positive integer.

Thus, the only solution to the problem is:

(5,2) \boxed{(5, 2)}

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.