Squared number!

1 , 4 , 9 , 16 , 25 , 36 , 49 , 64 , 1,\ 4,\ 9,\ 16,\ 25,\ 36,\ 49,\ 64, \ldots

The above shows the first few perfect squares.

Except for 1 and 9, are there any other perfect squares whose digits are all odd numbers?

Yes No

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.

10 solutions

Andy Hayes
Feb 28, 2018

Define an integer n = a b . n = \overline{\cdots ab}. That is, n n is an integer whose last two digits are a a and b . b. Now consider this integer mod 100 (this is a way of looking at just the last two digits of the number):

n 10 a + b ( m o d 100 ) n \equiv 10a+b \pmod{100}

Square it:

n 2 ( 10 a + b ) 2 ( m o d 100 ) n 2 100 a 2 + 20 a b + b 2 ( m o d 100 ) n 2 20 a b + b 2 ( m o d 100 ) \begin{aligned} n^2 &\equiv (10a+b)^2 \pmod{100} \\ n^2 &\equiv 100a^2+20ab+b^2 \pmod{100} \\ n^2 &\equiv 20ab+b^2 \pmod{100} \\ \end{aligned}

Suppose that this number has all odd digits. The tens digit of 20 a b 20ab is always even, and so the tens digit of n 2 n^2 can only be odd if the the tens digit of b 2 b^2 is odd. Also note that if b 2 b^2 is odd, then b b must be odd. So the possibilities for b 2 b^2 are { 1 , 9 , 25 , 49 , 81 } . \{1,9,25,49,81\}. If b b is odd, then the tens digit of b 2 b^2 is always even! This is a contradiction! Thus, n 2 n^2 can only have all odd digits if it is less than 10.

I did a similar approach considering it by cases though

Hans Gabriel Daduya - 3 years, 3 months ago

Was there any stipulation that we only examine two-digit perfect squares? I do not understand why you only look at the last two digits.

Ioannis Bazianas - 3 years, 3 months ago

Log in to reply

the larger digits won't affect the value of the last two digits. (100n+ab)^2 = 10,000n^2 + 200ab + ab^2 = 100*(100n^2+2ab) + ab^2

David Lamoureux - 3 years, 2 months ago

What about zeroes? If you look at 30^2 = 900. The question doesn't ask whether the number is odd, but rather each digit in it.

Jarrod Hitchings - 3 years, 3 months ago

Log in to reply

zero is even

David Lamoureux - 3 years, 2 months ago

Don't use tens numbers. Use another basis. Come on: write 11*11=121 in octals number

Rene Rensoli - 3 years, 3 months ago

Log in to reply

Yeah, the question should have specified

MegaMoh . - 2 years ago

Neat solution, like it!

Kelvin Hong - 3 years, 2 months ago
수현 이
Feb 22, 2018

Let's put the squared number to (10a + b)(10a + b). We don't care how big the number a is going to be. However, the number b is going to be only one digit. So, we take this simplified (10a + b)(10a + b) and make it into some long piece which is 100a a + 20ab + b b. Well b needs to be an odd number, because b * b has to be an odd number. (Even number times even number equals even number, odd number times odd number equals odd number.) In this case, b is one digit and an odd number, so it only gets to be 1 or 3 or 5 or 7 or 9. So, we all want to make these (1, 3, 5, 7, 9) into a squared number. 1 * 1 = 1, 3 * 3 = 9, 5 * 5 = 25, 7 * 7 = 49, 9 * 9 = 81 But 25 contains an even number(2), 49 has 4, and 81 has 8. So, that leaves me with only 1, 9.

The problem should say "made up of odd digits" not "made up of odd numbers."

Also, the solution is not complete. It does not show that there has to be an even digit.

Marta Reece - 3 years, 3 months ago

Made up from (odd digits) \text{(odd digits)} or (odd numbers) \text{(odd numbers)} ?

Your solution is incomplete.

Matin Naseri - 3 years, 3 months ago

Even numbers times even numbers are even so 'b' can't be an even digit

수현 이 - 3 years, 3 months ago

Okay, so someone in the know changed the answer to yes. Nice. Now it would be even better if that someone bothered to tell us why. Like maybe put up a solution. Or show which exception to the rule he found. Something. (Please, I'd really like to know...)

Marta Reece - 3 years, 3 months ago

Log in to reply

The answer has been changed back to "no."

Andrew Hayes Staff - 3 years, 3 months ago
Ankan Bairagi
Mar 13, 2018

An odd number is always of the form (2m+1), where m=1,2,3,...... Now the square of this form can be written as (8k+1) where k=1,2,3..... This implies that the last digit has to odd. We can express k=a+(10 b)+(100 c)+.....as 'k' is any positive integer. But 'k' is multiplied by 8. This makes the other digits even, as the sum of even numbers is even. Hence no squared number except 1 and 9 (single digit number) has its all digit odd.

"But 'k' is multiplied by 8. This makes the other digits even" ? how?

Komninos Maraslidis - 3 years, 3 months ago

Log in to reply

Let's say a, b, c.... are odd. Now you are multiplying it by 8 (which is an even number). '8k' term must be an even number because multiplication of even and odd or even and even is always even.

Now the confusion. To make a number even you you need only last digit to be even. And I our case, we are making the last digit odd after adding 1(this 1 is from the form 8k+1). Then why the other digits are even?

K is a number written in decimal system. If you multiply it by even number (8) the all the digits of the resulted number has to be even (regardless of a,b,c.....being odd). And when you add this up you will definitely get a number having not all odd digits.

Ankan Bairagi - 3 years, 3 months ago

Log in to reply

I've no idea what you're talking about, sorry. Also: "Now the square of this form can be written as (8k+1) where k=1,2,3" How do you know that?

"But 'k' is multiplied by 8. This makes the other digits even, as the sum of even numbers is even." This also doesn't make sense.

Komninos Maraslidis - 3 years, 2 months ago

Thirtysix writen on base elevens, not tens numbers but elevens sistem

Rene Rensoli - 3 years, 3 months ago

in general it's not true that for any k "k multiplied by 8, this makes the other digits even" like 4*8=32. so your proof doesn't seem to hold.

Meneghin Mauro - 3 years, 2 months ago
Arjen Vreugdenhil
Mar 11, 2018

Write N = 10 a + 5 b + c N = 10a + 5b + c with b = 0 , 1 b = 0,1 and 2 c 2 -2 \leq c \leq 2 . Then N 2 = 100 a ( a + b ) + 20 ( a c + b 2 ) + 10 b c + ( 5 b 2 + c 2 ) . N^2 = 100a(a+b) + 20(ac+b^2) + 10bc + (5b^2 + c^2). The last digit is odd iff 5 b 2 + c 2 5b^2 + c^2 is odd, i.e. either b b is odd or c c is odd (but not both).

The second-last digit is odd iff b c bc is odd, i.e. both b b and c c is odd.

Clearly, these conditions cannot both be true.

Let's try recursion!

Clearly, there are no numbers below 10 that works. Now, let's look at 10-19. a number n between 10 - 19 can be written as (10 + x), thus n^2 = [100 + 20x] + x^2

No matter what, the sum of the digits in the bracket will always have an even middle number (100, 120, 140, ..., 280) All of them end in 0, so they must also have an even final number.

Now, here's the fun part! In order for n^2 to have all odds digits, the final 2 digits of x^2 must be odd (and from 0 to 9, this means all digits must be odd), in order to make the total sum have an odd middle and final number (note that the final digit of the sum in bracket being 0 is important!). However, since n is between 10 and 19, x must be between 0 and 9! We know that this is impossible! (Really, 1^2 and 3^2 are 01 and 09) Thus, it is impossible for n from 0 to 19! (Note that we've proven something stronger -- we've proven that it's impossible for n from 0 to 19 to end with 2 odd digits )

Let's keep going, n from 20 to 29? n = (10 + x) for some x from 0 to 19; n^2 = 100 + 20x + x^2, and x^2 must have an odd final and middle digit for the sum to be so too.

But, we've proven that that's impossible as well!

This can be continued indefinitely, and thus, by recursion, this is true for all positive integers. Then, since -x^2 = x^2, it is also true for all integers.

An odd number is a number by the form 2n+1, where n is 1,2,3,4. The power of an even number is an even number. The power of an odd number is odd. The power of an odd number is (N x N-1) + N An odd number multiplied by an even number is always an even number, with the first digit even and the last even, plus the odd number equals an odd number with the first digit even and the last one odd. Hope you've understand, I don't know what did I've just type there :)

Ziyad Benkhadaj
Mar 17, 2018

Let n be a perfect square If n is even then at least its last digit is even If n is odd then sqrt(n) is odd then sqrt(n)=2k+1 therefore n=(2k+1)^2=4k^2+4k+1 But n-1 is a multiple of 4 so its two last digit are both even so n has last digit odd (because +1) and before-last digit is even because adding one to the last digit won't make it exceed 9 (it can only be 0 2 4 8) so not all digits of n are odd, n has at least one even digit Note: n has at least two digits (we ommitted the case of 1 and 9)

Michael Borrello
Mar 16, 2018

Let p p be the number whose square is composed of all odd digits. We can write p 2 p^2 in the following way:

p 2 = 1 0 n a n p + 1 0 n 1 a n 1 p + . . . + 1 0 2 a 2 p + 10 a 1 p + a 0 p p^2 = 10^na_np + 10^{n-1}a_{n-1}p + ... + 10^2a_2p + 10a_1p + a_0p

Where n N , n > 0 n \in \textbf{N}, n > 0 and a n a_n is given by a map of the set {0,1,2,3,4,5,6,7,8,9}.

We can factor out p p from the following expression, as well as write an expansion equal to p p .

p 2 = p ( 1 0 n a n + 1 0 n 1 a n 1 + . . . + 1 0 2 a 2 + 10 a 1 + a 0 ) p^2 = p(10^na_n + 10^{n-1}a_{n-1} + ... + 10^2a_2 + 10a_1 + a_0)

p = 1 0 n a n + 1 0 n 1 a n 1 + . . . + 1 0 2 a 2 + 10 a 1 + a 0 p =10^na_n + 10^{n-1}a_{n-1} + ... + 10^2a_2 + 10a_1 + a_0

If we can prove for all n N n \in \textbf{N} , where n > 0 n > 0 , that the expansion of p p has at least one even digit, then such a p p does not exist. We will try to prove the contrapositive.

Assume such a p p exists, then there does not exist an n N n \in \textbf{N} where n > 0 n > 0 s.t.

1 0 n a n + 1 0 n 1 a n 1 + . . . + 1 0 2 a 2 + 10 a 1 + a 0 10^na_n + 10^{n-1}a_{n-1} + ... + 10^2a_2 + 10a_1 + a_0

does not have an odd digit.

It is clear to see 1 0 n 10^n will always have an odd digit as it's leading digit. It is also clear that any linear combination of 1 0 n 10^n terms multiplied by an odd number will also be odd.

If a linear combination of 1 0 n 10^n is multiplied by an even number, the resulting number will have all even digits, and will therefore be even. We now have the equation...

p 2 = p × ( p^2 = p \times ( even number ) )

which will always yield an even number for p 2 p^2 , therefore such a p p does not exist.

I believe I've made a logical mistake in this proof. Please don't take this for a complete answer right now!

Michael Borrello - 3 years, 2 months ago
Devon Fair
Mar 14, 2018

Here's how I solved the problem graphically:

  1. Graph the function f ( x ) = x 2 f(x)=x^2 :

  2. Make a table that give f ( x ) = x 2 f(x)=x^2 for every positive integer x x :

Now look through the table. Notice how even if x x has all odd numbers, f ( x ) f(x) does not. Continue looking through the table until you hit 100:

Since no positive integers between 1 and 100 has a value f ( x ) = x 2 f(x)=x^2 that is all odd digits (other than 1 and 9), then there cannot be such a number for any other positive integer beyond 100.

That's like cheating man 😂😂

Prakhar Vaish - 3 years, 2 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
def dict_val(x):
    return x[1]

squares = [x**2 for x in range(1,10000000)]
count = 0
int_count = {}
for i in squares:
    for j in range(len(str(i))):
        if int(str(i)[j])%2 == 1:
            count += 1
    z = '%d/%d' % (count,len(str(i)))
    if z in int_count:
        int_count[z] += 1
    else:
        int_count[z] = 1
    count = 0

print sorted(int_count.items(), key=dict_val)

1
2
3
4
5
6
7
Ans: No, no other squares have all odd digits

Below, for example, ('2/5', 79)  means 2 odds across a square with 5 digits showed up 79 times..
('1/1', 2) are the numbers 1 and 9
('0/1', 1) is the number 4

[('0/2', 1), ('0/1', 1), ('1/1', 2), ('0/3', 2), ('0/4', 4), ('1/2', 5), ('0/5', 7), ('2/3', 8), ('0/6', 11), ('1/3', 12), ('4/5', 12), ('3/4', 13), ('0/7', 21), ('1/4', 25), ('5/6', 25), ('2/4', 26), ('0/8', 30), ('6/7', 37), ('1/5', 47), ('0/9', 50), ('7/8', 63), ('3/5', 72), ('2/5', 79), ('0/10', 81), ('1/6', 93), ('8/9', 109), ('4/6', 122), ('0/11', 126), ('9/10', 153), ('1/7', 174), ('2/6', 188), ('0/12', 202), ('10/11', 207), ('3/6', 244), ('5/7', 247), ('1/8', 303), ('0/13', 312), ('2/7', 409), ('6/8', 425), ('11/12', 440), ('4/7', 524), ('1/9', 531), ('0/14', 538), ('12/13', 666), ('3/7', 751), ('7/9', 783), ('1/10', 912), ('2/8', 938), ('13/14', 993), ('5/8', 1267), ('8/10', 1366), ('1/11', 1671), ('3/8', 1880), ('2/9', 1914), ('4/8', 1931), ('9/11', 2505), ('6/9', 2627), ('1/12', 2701), ('2/10', 3972), ('10/12', 4158), ('3/9', 4644), ('1/13', 4793), ('5/9', 5150), ('7/10', 5497), ('4/9', 5815), ('11/13', 7353), ('2/11', 7529), ('1/14', 7737), ('3/10', 10322), ('8/11', 10710), ('6/10', 12032), ('12/14', 12559), ('2/12', 14651), ('4/10', 16272), ('5/10', 17770), ('9/12', 21164), ('3/11', 23048), ('2/13', 27014), ('7/11', 28094), ('10/13', 39248), ('4/11', 41298), ('6/11', 46399), ('3/12', 48135), ('2/14', 50519), ('5/11', 54641), ('8/12', 60513), ('11/14', 74123), ('3/13', 99964), ('4/12', 101960), ('7/12', 118594), ('9/13', 129809), ('5/12', 152330), ('6/12', 158924), ('3/14', 200518), ('4/13', 235888), ('10/14', 266054), ('8/13', 281916), ('5/13', 404146), ('7/13', 441578), ('6/13', 489591), ('4/14', 530510), ('9/14', 654460), ('5/14', 1013042), ('8/14', 1137328), ('6/14', 1412135), ('7/14', 1477206)]

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...