Maths Olympiad Prep

Library / /5 of 19

Number theory Difficulty 6.1 National olympiad Find the answer

Let nn be square with 4 digits, such that all its digits are less than 6. If we add 1 to each digit the resulting number is another square. Find nn

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Let n n be a number with four digits such that all digits are less than 6. We have n=a2 n = a^2 where a a is an integer. We need a transformation that, if we add 1 to each digit of n n , the result should be another perfect square.

Let's denote the transformed number as n n' . If the original number is represented in the form n=1000a+100b+10c+d n = 1000a + 100b + 10c + d , then the transformed number will be n=1000(a+1)+100(b+1)+10(c+1)+(d+1) n' = 1000(a+1) + 100(b+1) + 10(c+1) + (d+1) .

Since the new number n n' must be a perfect square, we set:
n=n+1111=b2 n' = n + 1111 = b^2
for some integer b b .

This means:
b2=a2+1111 b^2 = a^2 + 1111

We are searching for integers a a and b b such that the above equation holds.

Given that n n is a 4-digit number and each digit is less than 6, the 4-digit square n n can range from 1000 1000 to 5555 5555 . Thus, the possible values for a a are those integers such that 32a74 32 \leq a \leq 74 because:
322=1024and742=5476 32^2 = 1024 \quad \text{and} \quad 74^2 = 5476

For each integer a a within this range, check if:
a2+1111=b2 a^2 + 1111 = b^2
which can be rewritten as:
b2a2=1111 b^2 - a^2 = 1111

This is equivalent to:
(ba)(b+a)=1111 (b - a)(b + a) = 1111

Since 1111=11×101 1111 = 11 \times 101 , the possible pair of factors are (1,1111)(1, 1111), (11,101) (11, 101) .

Trying factor pair (11,101)(11, 101):
ba=11,b+a=101 b - a = 11, \quad b + a = 101
Solving these equations:
2b=112    b=56 2b = 112 \implies b = 56
2a=90    a=45 2a = 90 \implies a = 45

Thus, we have a=45 a = 45 . Now calculate n n :
n=a2=452=2025 n = a^2 = 45^2 = 2025

Check the transformation:
- Add 1 1 to each digit of 2025 2025 to get 3136 3136 .
- Verify:
3136=56 \sqrt{3136} = 56

Thus, the number n n that satisfies the condition is:
2025 \boxed{2025}

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.