Finding a Perfect Square

N N is a 3-digit number that is a perfect square. When the first digit is increased by 1, the second digit is increased by 2, the third digit is increased by 3, the result is still a perfect square. Determine N N .

Details and assumptions :

Since digits do not exceed 9, the challenge assumes that the units digit of N N to be at most 6, the tens digit of N N to be at most 7 and the hundreds digit of N N to be at most 8.


The answer is 361.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

29 solutions

Athul Nambolan
May 20, 2014

Let the given number N = m 2 N = m^2 and let the number formed increasing the first digits of N be q 2 q^2 . We are given that N N is increased by 123 to obtain a new square i.e q 2 m 2 = 123 q^2 - m^2 = 123 , ( q + m ) ( q m ) = 123 (q + m) (q- m) = 123 .

Here we observe that 123 can be written only as 123 1 123 *1 or 41 3 41*3 as positive factors. Since q + m > q m q+m > q - m , this implies ( q + m ) = 123 (q+ m) = 123 or 41 and ( q m ) = 1 (q-m)= 1 or 3 respectively. On equating this linear equation, We get m = 19 m = 19 or 62. As m 2 m^2 is a three digit number, we reject m = 62 m = 62 , therefore m = 19 , N = m 2 = 361 m = 19 , N = m^2 = 361 .

[Latex edits - Calvin]

Common mistakes

  1. Not checking the cases properly. There are 8 cases from the factorization of 123 123 . 4 cases are negative, 2 cases have q m > q + m q-m > q + m , 1 case is too large, and the last case leads to the solution.

  2. Several solutions that tried to restrict the units digit of N N by considering the possible last digits of squares, ignored the possibility that it could have been 6.

Calvin Lin Staff - 7 years ago
Ghany M
Aug 4, 2013

N = x 2 ; x 2 + 123 = y 2 y 2 x 2 = 123 ( y + x ) ( y x ) = 41 × 3 = > y + x = 41 ; y x = 3 x = 19 = > N = 361 N=x^2 ; x^2+123=y^2 \\ y^2 - x^2 =123 \\ (y+x)(y-x)=41\times 3 => y+x=41 ; y-x=3 \\ x = 19 => N=361

Moderator note:

There is a leap in this argument from claiming that A B = 41 × 3 A = 41 , B = 3 AB = 41 \times 3 \Rightarrow A = 41, B = 3 . Why can't we have A = 123 A = 123 and B = 1 B = 1 ? Remember to check all other possible cases.

I make this mistake so often! In the second case N will become a 4 digit number: My Solution : I noticed that squares ending 1 or 6 can only be the possibilities. Keeping the restrictions in mind, This gives us 8 cases 11, 19, 21, 29, 14,16, 24, 26. I intuitively guessed 19 and it took me no time at all! But i wud give this proof if asked!

Rishabh Raj - 7 years, 3 months ago

N=100x+10y+z N=a^2 New N=100x+100+10y+20+z+3=100x+10y+z+123 New N =b^2 b^2-a^2=123 b^2-a^2=41 3 (b+a)(b-a)=41 3 or 123*1 b=22, 62 a=19, 61 If a=61, a^2 will be a 4-digit number Hence, a=19 and N=19^2=361

Kushagra Sahni - 7 years, 3 months ago

jawaban yang mudah dipahami bang... thank,,, kalo aku jawab manual og.

Ma'roef Afif - 7 years, 10 months ago

hasilnya kok bisa 41 dan 3 darimana?

Juang Bhakti Hastyadi - 7 years, 10 months ago

Log in to reply

itu kan 123 klo difaktorin jd 41x3. terus kan y sama x pasti positif, jdnya (y+x)>(y-x) , makanya y+x pasti 41, sama y-x pasti 3

Ghany M - 7 years, 10 months ago
Akshaj Kadaveru
May 20, 2014

Notice that among 1 2 , 2 2 , , 1 0 2 1^2, 2^2, \cdots , 10^2 , the units digits are 1 , 4 , 5 , 6 , 9 , 0 1,4,5,6,9,0 . Therefore, these are the only quadratic residues mod 10 10 . The only pairs of these that are 3 3 apart are 1 , 4 1,4 and 6 , 9 6,9 .

The three digit perfect squares range from 1 1 2 = 121 11^2 = 121 to 3 1 2 = 961 31^2 = 961 . Therefore, the only possible pairs of squares that could possibly work for N N are the ones ending in 1 1 or 6 6 , which are 1 1 2 , 1 4 2 , 1 6 2 , 1 9 2 , 2 1 2 , 2 4 2 , 2 6 2 , 2 9 2 , 3 1 2 11^2, 14^2, 16^2, 19^2, 21^2, 24^2, 26^2, 29^2, 31^2 . It is now easy to verify that 361 361 is our answer.

The last digit of N increased by 3. We know that 1,4,5 & 9 at the unit's place can only produce a perfect square from a natural number. so the possible 3rd digit of N is 1 and N+3 is 4. So, possible values of sqrt(N) are 11,19,21 (29 and 31 cannot be taken since they makes 4 digit numbers on adding 123/ upon comparing the subsequent perfect square ending with 4) Now applying Trial & Error method, we have 19*19 = 361 as answer

Jacob Jose - 4 years, 10 months ago
Kevin Sun
May 20, 2014

Since we know that the digit increases do not regroup, we know that the resulting number is N+123, which is also a perfect square. Letting N = k k, we know that k k+123 = m*m for some m > 0 and integer. Then m^2-k^2 = 123, which means that (m+k)(m-k) = 123. Since m+k and m-k are positive integers, either m+k = 41 and m-k = 3, or m+k = 123 and m-k = 1. It is easy to see that the second case gives no solution, and the first case gives k = 19 and m = 22. Thus N = 361, and if we perform the procedure on 361, we get 484, another square.

Wei Liang Gan
May 20, 2014

By increasing the first digit by 1, second digit by 2, third digit by 3 and using the assumption given, N increases by 123. Let N = a 2 , N + 123 = b 2 N=a^2, N+123=b^2 for some a , b Z + a,b \in \mathbb{Z}^+ Therefore, b 2 a 2 = 123 ( b + a ) ( b a ) = 3 41 b^2-a^2 = 123 \Rightarrow (b+a)(b-a)=3*41 . Clearly b + a > b a > 0 b+a > b-a > 0 and the factors are integers so there are only 2 cases.

Case 1: b + a = 123 , b a = 1 b+a = 123, b-a = 1 Solving we get a = 61 , b = 62 a=61,b=62 which is not possible since N = a 2 = 6 1 2 > 1000 N=a^2=61^2>1000 so it is not a 3-digit number.

Case 2: b + a = 41 , b a = 3 b+a = 41, b-a = 3 Solving we get a = 19 , b = 22 a=19,b=22 so N = 1 9 2 = 361 N=19^2=361 and N + 123 = 2 2 2 = 484 N+123 = 22^2 = 484 so the required answer is 361.

Yong See Foo
May 20, 2014

Let N = a 2 , X = b 2 , a , b N=a^2, X=b^2, a,b are natural numbers, where X X is the larger perfect square. Note that b 2 a 2 = ( b + a ) ( b a ) = 123 = 41 × 3 = 1 × 123 b^2-a^2=(b+a)(b-a)=123=41 \times 3=1 \times 123 . So there are 2 possible pairs of linear equations to solve. ( a , b ) = ( 22 , 19 ) , ( 62 , 61 ) (a,b)=(22,19), (62,61) . Clearly we are finding the former pair, since for the latter pair x = 6 1 2 x=61^2 is not 3 digit. So N = 1 9 2 = 361 N=19^2=361 .

Kshitij Varshney
May 20, 2014

First we take all the 3 digit numbers under 900 which are perfect square. we find 21 numbers, they are 100,121,144,169,196,225,256,289,324,361,400,441,484,529,576 ,625,676,729,784,841,900. after checking we get 361 only number in which if we add ,1to its hundred place ,2 to its tens place, 3 to its ones place then the result is also a perfect square. 361+123=484 which is a perfect square. hence 361 is the answer.

Ankit Chabarwal
Aug 5, 2013

Let the new number after given operations be M

Obviously, M-N=123

Case1: M=N+1

( N + 1 ) 2 {(N+1)}^2 - N 2 {N}^2 =123

⇒N=62

As, N 2 {N}^2 >999

So,62 is rejected

Case2: M=N+2

( N + 2 ) 2 {(N+2)}^2 - N 2 {N}^2 =123

⇒N is fraction

So,Case2 is rejected

Case3: M=N+3

( N + 3 ) 2 {(N+3)}^2 - N 2 {N}^2 =123

⇒N=19

N 2 {N}^2 =361

Hence, _ Ans.=361 _

You followed a very long and time-consuming method.But still your solution is unique.

Adhiraj Mandal - 7 years, 10 months ago

suppose that N = y^2, and the new perfect square is x^2, then x^2-y^2 = 123 <=> (xy) (x + y) = 3 * 41. with elimination we obtained that x = 22 and y = 19. so N = 19^2 = 361

maaf nih muhung.... mungkin yang kamu maksud (X-Y).... bukan (XY)

Rommel Yonatan - 7 years, 10 months ago

What if ( x + y ) = 123 (x+y)=123 , ( x y ) = 1 (x-y)=1 ? Although it gives N = 61 \sqrt{N}=61 , it may worth to mention. No offence.Thanks.

Navi Nahc - 7 years, 10 months ago

The above one are the solution plus a logical approach whenevr we square a nuber we get the unit digit as 1,4,5,6,9 if weadd 3 we should get either of these numbers so possible only 1 and 6 as u add 3 we get 4 and 9so check for 11,14,19 and so on hence u get the answer

Akash Thakur - 7 years, 10 months ago
Patrick Lin
May 20, 2014

Let N = x 2 N=x^2 . Then x 2 + 123 = y 2 x^2+123=y^2 for some positive integer y y as given.

Subtracting and factoring, we have ( y + x ) ( y x ) = 123 = 3 41 (y+x)(y-x)=123=3*41 , and since both x x and y y are positive y + x = 41 y+x=41 and y x = 3 y-x=3 . Solving, we get x = 19 x=19 , which means N = x 2 = 361 N=x^2=361 .

Fernando Valle
May 20, 2014

Let's say N = a 2 N=a^2 , and N + 123 = B = b 2 N+123=B=b^2 . Then, B N = 123 B-N=123 \Rightarrow ( b + a ) ( b a ) = 123 = 3 41 (b+a) \cdot (b-a) = 123 = 3 \cdot 41 . Notice that ( b + a ) < 3 41 (b+a) < 3 \cdot 41 and ( b a ) > 1 (b-a) > 1 , so we have, by the Fundamental Theorem of Arithmetic: b + a = 43 b+a = 43 and b a = 3 b-a = 3 . Then, we conclude that a = 19 a=19 , from what one gets N = a 2 = 361 N=a^2=361 .

Abhishek Jain
May 20, 2014

abc = N^2

(a + 1)(b + 2)(c + 3) = k^2

100a + 10b + c = N^2 -----------(1)

100a + 100 + 10b + 20 + c + 3 = k^2--------(2)

put (1) in (2)

N^2 - k^2 = -123

(N - k)(N + k) = -3 * 41 or -41 * 3

according to question its clear that k is a bigger number

so , N - k = -3 ---------------(3)

N + k = 41 --------------(4)

add both (3) and (4)

N = 19 and k = 22

required answer = 19^2 = 361

Patel Kishan
May 20, 2014

Let that number be \overline{xyz} .... So converting it into digit order it can be written as 100x + 10y + z = N As this number is a perfect square, Let N = k^2 \Rightarrow Now we will increase the digits as given

First digit is increased by 1,so it will become x + 1, Second digit is increased by 2,so it will be y + 2, Similarly third digit will become z + 3, Finally our new number is \overline{x+1 y+2 z+3}

Now this new number is also a perfect square, so let it be p^2.

writing in digit order,

100(x + 1) + 10(y + 2) + z +3 = p^2

100x + 100 + 10y + 20 +z + 3 = p^2

Now 100x + 10y + z can be replaced by k^2

k^2 + 123 = p^2

p^2 - k^2 = 123

(p+k)(p-k) = 123 We know that p> k, so p+k > p-k now 123 can be written as 41 \times 3, So p+k = 41 p-k= 3 On solving we get p=22, k=19 So N = k^2 = 361.

Sudhanshu Mishra
Aug 6, 2013

Let N = p 2 N = p^2 Then, N + 123 = q 2 N+123 = q^2

where p and q are positive integers.

q 2 p 2 = 123 = 3 41 q^2 - p^2 = 123 = 3*41 ( q p ) ( q + p ) = 3 41 (q-p)*(q+p) = 3*41

Since, p and q are both positive integers hence p = 19 & q = 22 N = p 2 = 361 N = p^2 = 361

How did you got q q and p p extremely fast like that?

Hafizh Ahsan Permana - 7 years, 10 months ago

Log in to reply

He assumes q p = 3 q-p=3 and q + p = 41 q+p=41 from the equation. The solutions to this system are indeed 19 19 and 22 22 .

Ivan Sekovanić - 7 years, 10 months ago

got it! ;)

Princess Marie Cabahug - 7 years, 10 months ago
Mehdi Galactico
Aug 4, 2013

N = c + 10b + 100a = X² M = (c+3)+10(b+2)+100(a+1)=Y² M=N+123=Y² M = X²+123=Y² 123 = Y²-X² 123=(Y-X)(Y+X) Y-X = 1 and Y+X = 123 .. X = 61 .. X²=N=3721 Not a 3-digit number Y-X=3 and Y+X=41 ... X=19 .. X²=N=361

Y-X = 1 and Y+X = 123 why ?

Ahmed Lo'ay - 7 years, 10 months ago

Log in to reply

Possibility .. it doesn't give a correct solution because it gives X=61 and N=3721

Mehdi Galactico - 7 years, 10 months ago
Nurholis Course
Aug 5, 2013

"n is a 3-digit number" Let "abc" represent the digits of n. 0 < a n = 100a + 10b + c

"n is a perfect square." n = 100a + 10b + c = p², where p is an integer.

"When the first digit is increased by 1, the second digit is increased by 2, and the third digit is increased by 3, the result is still a perfect square." 100(a+1) + 10(b+2) + (c+3) = q²

expand terms 100a + 100 + 10b + 20 + c + 3 = q²

regroup terms (100a + 10b + c ) + 123 = q² p² + 123 = q² q² - p² = 123 (q + p)(q - p) = 123 123 is the product of two prime numbers, 3 and 41, and q > p, so q + p = 41 q - p = 3

q = 22 q² = 484 n = p² = q² - 123 = 361

Maedhros 777
Aug 5, 2013

N may be written as 100a + 10b + c, where a, b, and c are the digits of N. The altered number is equal to 100 ( a + 1 ) + 10 ( b + 2 ) + ( c + 3 ) = 100 a + 10 b + c + 123 = N + 123 100(a + 1) + 10(b + 2) + (c + 3) = 100a + 10b + c + 123 = N + 123 . Since N = k 2 N = k^{2} and the altered number is equal to m 2 m^{2} for positive integers k and m, k 2 + 123 = m 2 k^{2} + 123 = m^{2} . Rearranging and factoring, ( m + k ) ( m k ) = 123 (m + k)(m - k) = 123 . Since the factorization of 123 is 3 * 41, either m + k = 123 and m - k = 1 or m + k = 41 and m - k = 3. In the first case, m = 62 and k = 61, but 6 1 2 61^{2} is not a 3-digit number. Thus the second case must be the correct solution (m = 22 and k = 19), so N = 1 9 2 = 361 N = 19^{2} = 361 .

Ho Wei Haw
Aug 5, 2013

Let N be n 2 n^{2} for some integer n.

n 2 n^{2} + 123 = k 2 k^{2} for some integer k that is strictly greater than n.

Rearranging the equation,

k 2 k^{2} - n 2 n^{2} = 123

Factorising the LHS and RHS,

(k - n)(k + n) = 3 x 41

Evidently, k - n = 3 and k + n = 41 since k > n.

Solving the equations, one will get n = 19

Thus, N = 19 x 19 = 361

N=X^2

X^2 + 123 = Y^2

123 = Y^2 - X^2

   = (Y+X)*(Y-X)

41 3 = (Y+X) (Y-X)

Y+X = 41 hence possible value would be Y=22, X=19.

so ans = 19^2 = 361

Manoj Manu - 7 years, 10 months ago
J D
Apr 24, 2016

Perfect squares differ from each other by consecutive odd numbers. Since 123 has a prime factorization of 41 x 3, it can be written as 39 + 41 + 43. This means that to find N, we need to find the perfect square that differs from the next one above it by 39. 400 - 361 = 39, so N = 361. Indeed, 361 is 19 squared and 361 + 123 = 484 is 22 squared.

Aryani Paramita
May 20, 2014

Since 3-digits perfect square is only about 22 numbers, so trial and error can be used in this problem.

1. N 1. N should be less than 800

2. 2. The last digit of perfect square is 1,4,5,6, and 9.

To make the last digit of N N + 3 is also perfect square, the last digit of N N should be 1.

Let us list the possible numbers : 121; 361; 441; 841

By trial and error method :

121+123 = 244

361+123=484

441+123=564

841+123=964

From the result we can see that the correct answer for N N is 361 as 484 = 2 2 2 22^2

João Bento
Aug 11, 2013

N é um número de 3 algarismos, então N pode ser escrito na forma: "XYZ" (sendo X, Y e Z os algarismos que o compõem). Neste caso, seu valor seria N = 100X + 10Y + Z. N é um quadrado perfeito, N = a². Então: a² = 100X + 10Y + Z .

"Quando o primeiro dígito é aumentado por 1, o segundo dígito é aumentado por 2, o terceiro dígito é aumentado por 3, o resultado é ainda um quadrado perfeito."

100(X + 1) + 10(Y + 2) + Z + 3 = b² (b², pois é um outro quadrado perfeito).

b² = 100(X + 1) + 10(Y + 2) + Z + 3

b² = 100X + 100 + 10Y + 20 + Z + 3

b² = 100X + 10Y + Z +123 ⇒ b² = a² + 123

b² - a² = 123

(b - a)(b + a) = 123

Observação: O número 123 = 41 × 3 41 \times 3 , em que ambos são primos.

Como b > a, então temos que:

b + a = 41

b - a = 3

Então b = 22 e a = 19.

Conclusão: N = a² = 19² = 361.

Narasimha Rao B L
Aug 11, 2013

as the perfect square end with 1,4,6,9 by adding 3 to the unis place only we again get perfect square so by checking all these we get answer

O quadrado deve estar entre 100 e 876, pois o maior algarismo que compõe o número é 9. Portanto começamos por 10² = 100, fazendo as alterações que o exercício manda, chagamos em 223, que não é quadrado perfeito. Então segue para 11² = 121, se alterarmos, temos 244, que também não é quadrado perfeito, e fazemos até chegar a 19² = 361, cujo alteração nos levará a 484 = 22²

é bom evitar o uso da força bruta em soluções porque (quase) nunca se sabe até onde vai durar. No caso desse exercício, era bem claro que a raiz deveria ser um número entre 10 e 30. No caso de persistir em usar a força bruta, tente pelo menos otimizar! No caso desse exercício, você poderia seguir esse método:

1 - Perceba que o último digito de todos os quadrados perfeitos é 0, 1, 4, 6 ou 9. Com isso, você saberia que o número termina em 1 ou 6, pois são os únicos que somados com 3 daria outro quadrado perfeito

2 - Os únicos números que elevados ao quadrado dão 1 ou 6 são: 1,4,6 e 9, então use apenas números que terminam com 1,4,6 ou 9 para testar.

Com esse método, você vai apenas testar 11 * 11, 14 * 14, 16 * 16 e enfim 19 * 19

Lucas Montuano - 7 years, 10 months ago
Nicky Sa
Aug 9, 2013

assume N = a^2 and N + 123 = b^2 a^2 + 123 = b^2 b^2-a^2 = 123 (b+a)(b-a)= 123 , 123 = 1 X 123 ,
123 = 3 X 41 Because b^2-a^2 = 123, and a,b≥0 , we get b>a

- Assume (b+a)=123 and (b-a)=1

We get b=62 and a=61, so N = 61^2 = 3721 Contradiction.

- Assume (b+a)=41 and (b-a)=3

We get b=22 and a=19, so N = 19^2 = 361 So N = 361

Happy Melodies
Aug 9, 2013

paragraph 1 Let N = 100a + 10b + c = x^{2} . After the digits of N are changed (in the question), N = 100(a+1) + 10(b+2) + c+3 = 100a + 10b +c + 123 = x^{2} +123 = y^{2} . paragraph 2 Since, y > x, y^{2} = (x + k)^{2} = x^{2} + 2kx + k^{2} for some positive integer k. Note that 2kx + k^{2} = 123. Factoring k out, we get k(2x +k) = 123. Using prime factorisation of 123, we get k(2x +k) = 123 = 3 \times 41 , since both k and 2x+k are clearly integer. k < 2x+k , therefore, we get k = 3 and x = \frac{41 - 3}{2} = 19. N = 19^{2} = 361. Done. :)

Kalpesh Gupta
Aug 9, 2013

"n is a 3-digit number" Let "abc" represent the digits of n. 0 < a n = 100a + 10b + c

"n is a perfect square." n = 100a + 10b + c = p², where p is an integer.

"When the first digit is increased by 1, the second digit is increased by 2, and the third digit is increased by 3, the result is still a perfect square." 100(a+1) + 10(b+2) + (c+3) = q²

expand terms 100a + 100 + 10b + 20 + c + 3 = q²

regroup terms (100a + 10b + c ) + 123 = q² p² + 123 = q² q² - p² = 123 (q + p)(q - p) = 123 123 is the product of two prime numbers, 3 and 41, and q > p, so q + p = 41 q - p = 3

q = 22 q² = 484 n = p² = q² - 123 = 361

Andres Fabrega
Aug 6, 2013

Let a,b,c be the digits. abc = x^2. abc + 123 = y^2. Substracting first one form second one, 123 = y^2-x^2 = (y+x)(y-x) = 41* 3. Hence y+x=41, y-x = 3. Solving, y = 22. Therefore, abc + 123 = 484. So, abc = 361

Max Baroi
Aug 5, 2013

Let N = n 2 N= n^2 . So, n 2 + 123 = m 2 n^2+123=m^2 . By algebra we have 123 = ( m n ) ( m + n ) 123=(m-n)(m+n) where m n m-n and m + n m+n are integers. The prime factorization of 123 123 is 3 41 3*41 . Therefore, m n = 1 m-n=1 and m + n = 123 m+n=123 or m n = 3 m-n=3 and m + n = 41 m+n=41 .

If m n = 1 m-n = 1 and m + n = 123 m+n = 123 , then we have m = 62 m=62 and n = 61 n=61 . But then, N = n 2 = 3721 N=n^2=3721 , which contradicts that N N is a 3-digit number.

We then check the other possibility: m n = 3 m-n=3 and m + n = 41 m+n=41 . We get m = 22 m=22 and n = 19 n=19 . Verifiying our answer we see 1 9 2 + 13 = 484 = 2 2 2 19^2+13=484=22^2 . Thus, N = n 2 = 361 N=n^2=361 .

gr8 explanation...thnx!

sayantan mukherjee - 7 years, 10 months ago
Vinayak Verma
Aug 5, 2013

N^2 + 123 = M^2.
M^2 - N^2 = 123.
M^2 - N^2 = 39 + 41 +43 (Since every two consecutive perfect squares X and Y have a difference of (2 * root X) - 1).
21^2 - 19^2 = 123.
so, N = 19.
and N^2 = 361.
Hence, the answer is 361





Moderator note:

How does knowing that M 2 N 2 = 39 + 41 + 43 M^2 - N^2 = 39 + 41 + 43 and X Y = 2 X 1 X - Y = 2 \sqrt{X} - 1 lead to 2 1 3 1 9 2 = 123 21^3 - 19^2 = 123 ?

When writing up a solution, you should ensure that your statements follow from each other. In this case, it is much better to simply state: "Observe that 2 1 2 1 9 2 = 123 21^2 - 19^2 = 123 , hence satisfies the conditions. Thus N 2 = 1 9 2 = 361 N^2 = 19^2 = 361 ."

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...