1 4 4 1 4 4 4 = 1 2 2 = 3 8 2
Are there any other numbers 1 4 4 … 4 4 (starting with 1 and followed by all 4s) that are perfect squares?
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.
Why can you factor out 1 6 ? 1 4 4 … 4 4 isn't divisible by 1 6 for n ≥ 3 .
12012^2 = 144288144, which starts with 144 and ends on 44. So I'm not wrong :/. The answer is 'Yes'.
Log in to reply
The dots were meant to say that there are a bunch of 4 s in between. I'm sorry for the confusion.
Log in to reply
But it literaly says: "starting with 144... and ending in ...44" thats what I understand then. I also got confused.
@Henry U , you could say "(an integer that exists of a 1 followed by four or more 4's)"
Log in to reply
@Carlo Wood – That's a better wording, thank you. Somehow, I can't edit the problem, so @Calvin Lin, could you replace the part in brackets by "a 1 followed by at least 4 4's"?. Thanks!
the answer 'no' is clearly wrong. the mistake in this problem is not in the question, but in the answer. the meaning of the question is unmistakable - starts w 144, ends in 44. says nothing about the middle, which means 'whatever'. any number that starts with 12 pr 38 has enough zeroes in between and ends with 12 or 38 will fit the bill. so, the only correct answer is yes
Log in to reply
Then we have a horse of a different colour. In setting questions detail, accuracy, and lack of ambiguity are everything!!
What should the number of digits of 144...44 be in the solution?
Log in to reply
The question is just whether there is a number with any number of 4's that is a perfect square.
So what about 12012^? Starts with 144 and ends with 44? This is a solution or have I missed something here
Log in to reply
Sorry Carlo just noticed you came to same solution! There another one 38038 !! Starts with 144 and ends with 44!!
Well done finding that number, but the problem asks about numbers which have only the initial 1 followed by 4’s. Your number is 144288144, which is close, but the question is interested in numbers like 144444444.
Log in to reply
He commemted that before I had changed the wording because it was very ambigous before that.
if you can factor a 4 out of the sum the remainder modulo 4 should be zero
Log in to reply
The remainder of the number 1 n 4 ’s 4 4 4 … 4 4 4 is indeed 0 because it ends in 4 4 which is divisible by 4 . At the end, where I mentioned the remainder ( m o d 4 ) , I was referring to the number 1 n 4 ’s 4 4 4 … 4 4 4 ÷ 4 = 3 6 ( n − 2 ) 1 ’s 1 1 1 … 1 1 1 . which leaves a remainder 3 ( m o d 4 ) .
Perfect solution, btw can you explain by using theory that the remainder of a square number divided by 4 is always 0 or 1
Log in to reply
Every integer n can be written as either n = 2 k , k ∈ Z or n = 2 k + 1 , k ∈ Z (even and odd numbers).
If we square both forms, we get
( 2 k ) 2 = 4 k 2 = 4 a + 0 for some integer a = k 2
( 2 k + 1 ) 2 = 4 k 2 + 4 k + 1 = 4 ( k 2 + k ) + 1 = 4 b + 1 for some integer b = k 2 + k
So the square of an even number is always divisible by 4 and the square of an odd number is always one more than a multiple of 4 .
You have a typo in the soln you have written 2 in place of 4
Log in to reply
Thanks for noting that, I think I have corrected the place you meant
Sorry, if this is obvious, but why did you divide by four? If every square number mod 4 is either 0 or 1, evenly dividing by 4 means that the number has a chance to be true square number. But you factored out a 4 and then divided by 4 again? I'm a little confused as to why you needed to do this...
Log in to reply
A square number can be written as, if even, (2c)^2 and odd as (2c+1)^2. Divinding by 4 we get: (2c)^2/4 = c^2 => zero remainder (2c+1)^2/4 = (4c^2+4c+1)/4 => we can see that in this case we obtain 1 as remainder.
But what about sqrt(1444...44)? [Ps. It's 1 following by 77 digits of 4]
** If my calc working properly, It's 2^(380058475033045993045349675188918159692)
Log in to reply
That's a nice near-miss you've found there. According to Wolphram Alpha , it's only 0.00177 away from the next square number. But it's not a perfect square.
The numbers of this form (starting at 144) are all divisible by 4, but after dividing them by 4, the quotient mod 8 quickly stabilizes: it is 4, 1, 3, 7, 7, 7... as can easily be checked. Neither 3 nor 7 are quadratic residues mod 8, so the answer is No.
Consider the remainders of such numbers after dividing by 16. A quick check tells us that perfect squares are always congruent to 0 , 1 , 4 , or 9 modulo 16.
1 4 1 4 4 1 , 4 4 4 1 4 , 4 4 4 1 4 4 , 4 4 4 1 , 4 4 4 , 4 4 4 ≡ 1 4 mod 1 6 ≡ 0 ≡ 4 ≡ 1 2 ≡ 1 2 ≡ 1 2
Note that 1 0 , 0 0 0 = 1 6 × 6 2 5 , so every number from 1 4 , 4 4 4 on is congruent to 4 , 4 4 4 ≡ 1 2 mod 16, and thus not a perfect square.
[This train of thought was inspired by Henry U factoring out 2 2 = 4 and then considering divisibility by 4.]
How does one check what perfect squares are congruent to modulo 16? Or any number, for that matter?
Log in to reply
Look up modular arithmetic . There are only 16 possible remainders when you divide by 16: 0, 1, 2, ..., 14, 15. Just look at the squares of those numbers (so the perfect squares from 0 to 225) and see what the remainders are when dividing by 16. It doesn't take too long, and you see a lot of repeated values.
0 2 = 0 = 1 6 × 0 + 0 8 2 = 6 4 = 1 6 × 4 + 0
1 2 = 1 = 1 6 × 0 + 1 9 2 = 8 1 = 1 6 × 5 + 1
2 2 = 4 = 1 6 × 0 + 4 1 0 2 = 1 0 0 = 1 6 × 6 + 4
3 2 = 9 = 1 6 × 0 + 9 1 1 2 = 1 2 1 = 1 6 × 7 + 9
4 2 = 1 6 = 1 6 × 1 + 0 1 2 2 = 1 4 4 = 1 6 × 9 + 0
5 2 = 2 5 = 1 6 × 1 + 9 1 3 2 = 1 6 9 = 1 6 × 1 0 + 9
6 2 = 3 6 = 1 6 × 2 + 4 1 4 2 = 1 9 6 = 1 6 × 1 2 + 4
7 2 = 4 9 = 1 6 × 3 + 1 1 5 2 = 2 2 5 = 1 6 × 1 4 + 1
Log in to reply
Oh interesting, I had the same question! But how does one think of “Hmm.. lemme check the residue mod 16? lol just asking
Since any number 1 4 4 4 … 4 4 4 is even, it must be the square of an even number, i.e. 1 4 4 4 … 4 4 4 = ( 2 k ) 2 = 4 k 2 .
Thus any 1 4 4 4 … 4 4 4 is a multiple of 4 .
In our case 1 4 4 = 1 2 2 = ( 2 ⋅ 6 ) 2 = 4 ⋅ 3 6
and 1 4 4 4 = 3 8 2 = ( 2 ⋅ 1 9 ) 2 = 4 ⋅ 3 6 1 .
Now let's take a look at 1 4 4 4 … 4 4 4 numbers with more than two 4 digits: by dividing any such number by 4 we get 3 6 1 … 1 1 1 , in fact
4 1 4 4 4 … 4 4 4 = 4 1 4 4 0 … 0 0 0 + 4 4 … 4 4 4 = 3 6 0 … 0 0 0 + 1 … 1 1 1 = 3 6 1 … 1 1 1 .
Any 3 6 1 … 1 1 1 is an odd number, thus it must be the square of an odd number, i.e. 3 6 1 … 1 1 1 = ( 2 l + 1 ) 2 = 4 l 2 + 4 l + 1 .
By rearranging we see that 3 6 1 … 1 1 0 = 4 l 2 + 4 l = 4 ( l 2 + l )
i.e. any number on the left must be a multiple of 4 ; but any such number must be divisible by 4 , thus it must have the last two digits divisible by 4 , which in our case is never true for 1 0 is not divisible by 4 .
Summing up: we have just proven that any 3 6 1 … 1 1 1 (with two or more 1 digits) can't be the square of an integer number k (see first line), so the answer is that there are no other 1 4 4 4 … 4 4 4 that are perfect squares.
Let 144...4 (with n fours) be a perfect square. Since its even, we may let 4k^2 = 144...4=10^n +44...4. This implies, k^2 = 25×10^(n-2) + 11...1. Now, if n is greater than 3, then 25×10^(n-2) is a multiple of 4 and the remaining 111....1=11...100+11, which is of the form 4a+3. So the whole RHS is of the form 4b+3, which can never be a perfect square.
If x 2 = 1 4 . . . 4 then x 2 − 4 = ( x + 2 ) ( x − 2 ) is a multiple of 10, so x is even and x = + / − 2 ( m o d 5 ) : combined the last digit of x must be 2 or 8. Below, a, b and c are nonnegative integers.
1) Suppose x = 1 0 a + 2 . Then x 2 = 1 0 0 a 2 + 4 0 a + 4 ⟹ a must end on 1 or 6 ⟹ x must end on 12 or 62
1.1) Suppose x = 1 0 0 b + 1 2 . Then x 2 = 1 0 0 0 0 b 2 + 2 4 0 0 b + 1 4 4 , implying that the 3rd digit from the right in x 2 is odd. The only possibility satisfying the pattern is x 2 = 1 4 4 .
1.2) Suppose x = 1 0 0 b + 6 2 . Then x 2 = 1 0 0 0 0 b 2 + 1 2 4 0 0 b + 3 8 4 4 . Now 4b+8 must end on 4, so b must end on a 4 or a 9, so x must end on 462 or 962.
1.2.1) Suppose x = 1 0 0 0 c + 4 6 2 . Then x 2 = 1 0 0 0 0 0 0 c 2 + 2 × 1 0 0 0 × 4 6 2 × c + 2 1 3 4 4 4
1.2.2) Suppose x = 1 0 0 0 c + 9 6 2 . Then x 2 = 1 0 0 0 0 0 0 c 2 + 2 × 1 0 0 0 × 9 6 2 × c + 9 2 5 4 4 4
For both these cases there is no solution because the digit at position 4 from the right is odd (and it cannot be the leading 1 since x 2 > 1 4 4 4 ).
Summarizing: The only solution for possibility 1) is x = 1 2 .
2) Suppose x ends on an 8, so x = 1 0 a + 8 . Then x 2 = 1 0 0 a 2 + 1 6 0 a + 6 4 ⟹ 6a+6 must end on a 4 ⟹ 6a ends on an 8 ⟹ a ends on a 3 or 8. ⟹ x ends on 38 or 88
2.1) suppose that x ends on 38. x 2 = ( 1 0 0 b + 3 8 ) 2 = 1 0 0 0 0 b 2 + 7 6 0 0 b + 1 4 4 4 . Possibilities are: b = 0 or b = 5 ( m o d 1 0 ) ⟹ x ends on 038 or 538
2.1.1) if x ends on 038, the 4th position from the right is odd so b = 0 ⟹ x = 3 8 is the only solution.
2.1.2) if x ends on 538, x 2 = ( 1 0 0 0 c + 5 3 8 ) 2 = 1 0 0 0 0 0 0 c 2 + 1 0 7 6 c + 2 8 9 4 4 4 . Here too, position 4 from the right is odd and x 2 > 1 4 4 4 .
2.2) suppose that x ends on 88. x 2 = ( 1 0 0 b + 8 8 ) 2 = 1 0 0 0 0 b 2 + 1 7 6 0 0 b + 7 7 4 4 . Position 3 from the right is odd and x 2 > 1 4 4 .
Summarizing: The only solution for possibility 2) is x=38, and 12 and 38 are the only solutions for x.
I was lazy and wrote a computer program. I tested it to 100,000,000 numbers and decided that I was pretty sure the answer was no.
function checkNumber (n) {
var arg = n.toString();
var arr = arg.split("");
if (arr[0] === "1") {
var counter = 0;
for (var i = 1; i < arr.length; i++) {
if (arr[i] === "4") {
counter++;
}
}
if (counter === arr.length - 1) {
return true
} else {
return false
}
} else {
return false;
}
}
var check = 0;
for (var i = 4; i <= 100000000; i++) {
if (checkNumber(i*i)) {
check++;
}
}
console.log(check)
python
for i in range(10000):
for j in range(200):
if i*i==int('1'+'4'*j):
print(i,flush=1)
I used brute force.
I don't know much about python and runtime, but I think you could also have used
1 |
|
That way, you generate the number, take its square root and check if it is an integer.
Problem Loading...
Note Loading...
Set Loading...
Every number 1 n digits 4 4 … 4 4 can be written as 1 0 n + n digits 4 4 … 4 4 = 1 0 n + 4 ⋅ ( n digits 1 1 … 1 1 ) = 1 0 n + 4 ⋅ 9 ( 1 0 n − 1 ) .
For n ≥ 2 , we can factor out 2 2 , since we only want to prove that the expression is not a perfect square.
1 0 n + 4 ⋅ 9 ( 1 0 n − 1 ) = 4 ⋅ ( 2 5 ⋅ 1 0 n − 2 + 9 ( 1 0 n − 1 ) )
Let's look at the remainder when dividing by 4 . The remainder of a square number divided by 4 is always 0 or 1 .
The remainder of a sum is the sum of the remainders, so the remainder of 2 5 ⋅ 1 0 n − 2 + 9 ( 1 0 n − 1 ) is the remainder of 2 5 ⋅ 1 0 n − 2 , which is 0 for n ≥ 4 , plus the remainder of 9 ( 1 0 n − 1 ) = n digits 1 1 … 1 1
To test for divisibility by 4 , we look at the two last digits, 1 1 . They give a remainder of 3 when divided by 4 . But since the remainder of a perfect square is either 0 or 1 , this number with remainder 3 cannot be a perfect square, so there are No other such numbers.