If we were to take the first 1 0 0 0 0 0 square numbers, and inspect them, how many numbers will have 2 1 as its last two digits.
For example, 1 1 2 has 2 1 as it's last two digits, as 1 1 2 = 1 2 1
Bonus: Create a formula (or an explanation, I am okay with both) to find out how many square numbers have X Y as its last two digits, where X and Y are separate digits (they can be equal) , for n square numbers.
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.
Brillianto answero. Thanks!
if we write the last 2 digits of all squares we see that the digits 00 and 25 repeat after ten places and all other digits cycle periodically so numbers with last digit as 00 or 25 can be calculated by dividing n by 10 and rounding down that is the numbers of squares till n squared ending with 25 or 00 as their last two digits are the digits of n removing its last one digit for example for n=23454 the number of squares ending with last two digits as 25 or 00 is 2345. now for all other numbers there are just 22 different last two digits which are possible for squares the last being 96 obtained by 24.as they cycle periodically the number of digits having them can be calculated by subtracting 2 times the digits of n(excluding last)and them diving by 20 and rounding down then a 1 can be added to the numbers till the last one which in case of 23454 is 16 as its square has last digit as 16 and during the last cycle 16 and numbers preceding it will gain one more value.
Now for the actual question numbers with 25 or 00 as last digit is 10000(one zero less) so for other numbers it is (100000-2*10000)/20=4000 and as it ends with zero (a complete cycle)we do not need to add one and hence 4000 is the answer.
i think someone can generalise for base and for no of digits to be checked .is case of base 10 we have its factors as 5 whose square is 25 so it comes frequently and in this way someone can generalise this for any base.
feel free to be critical toward my approach i would like to hear everyone's opinions.
thanks for reading :)
I solved it with python easy peasy.. a=0 for i in range (0,100000): if (i**2)%100==21: print(a) a=a+1
Log in to reply
Can you use the three clicks? Show it like @Vinayak Srivastava has done.
Log in to reply
I can also do 3 clicks @Yajat Shamji and i did it as @Sahil Goyat is my big brother
Log in to reply
@Razing Thunder – I am trying to say, show your code as @Vinayak Srivastava has showed it.
Log in to reply
@A Former Brilliant Member – I do not know how
Log in to reply
@Razing Thunder – @Vinayak Srivastava , can you show @Razing Thunder how to show Python code?
Hi @Hamza Anushath I had deleted the post from my original account i.e @Siddharth Chakravarty so I couldn't write again.
Solution:
The last 2 digit of the square of a number depends on the last 2 digits of that number. So to get 21 as the last two digits we can only have 11, 39, 61 and 89 as the last 2 digits of the no. So the numbers would be
11, 111. 211. 311, 411, ...
39, 139, 239, 339, 439, ...
61, 161, 261, 361, 461, ...
89, 189, 289, 389, 489, ...
These above 4 sequences are A.P and they all have 1000 terms in between 100000. So the total no. of terms will be 4 x 1000 = 4000.
@Chew-Seong Cheong has already posted a proof for this. I did it using an another approach. I will soon upload it within a day as I'm trying to make some images or animation for the explanation why only 11, 39, 61 and 89 are possible, in short, I will provide a concise explanation.
1 2 3 4 5 |
|
1 |
|
Hey i also do the same but i do not know how to show the code like you can u tell me ?
Log in to reply
Log in to reply
Can u explain how
Log in to reply
@Razing Thunder – use ``` in the start and end.
You should only post Python solutions if the problem is hard analytically or your or program is really special
Log in to reply
Your opinion is right i will follow..
Log in to reply
I was not telling you
@Mahdi Raza , @Vinayak Srivastava , @Páll Márton , @Siddharth Chakravarty , @Yajat Shamji
A question made in honour of you all
Nice! @Hamza Anushath
Log in to reply
Thanks for the appreciation @Yajat Shamji
Problem Loading...
Note Loading...
Set Loading...
We need to find all positive integers N ≤ 1 0 0 0 0 0 such that N ≡ 2 1 (mod 100 . We can always write any positive number N = 1 0 0 k + 1 0 m + n , then we have:
N 2 ≡ ( 1 0 0 k + 1 0 m + n ) 2 (mod 21) ≡ ( 1 0 m + n ) 2 (mod 21) ≡ 1 0 0 m 2 + 2 0 m n + n 2 (mod 21) ≡ 2 0 m n + n 2 (mod 21) Only the last 2 digits of N affect the last 2 digits of N 2
This implies that 2 0 m n + n 2 ≡ 2 1 (mod 100) . Since 2 0 m n + n 2 ≡ n 2 (mod 10) , this means that only the last digit n affects the last digit of N 2 . Therefore, it can only be n = 1 or n = 9 .
\When ⎩ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎧ n = 1 n = 9 ⟹ 2 0 m + 1 ≡ 2 1 (mod 100) ⟹ 1 8 0 m + 8 1 ≡ 8 0 m − 1 9 ≡ 2 1 (mod 100) ⟹ { m = 1 m = 6 ⟹ { m = 3 m = 8
Therefore all N which end with 1 1 , 6 1 , 3 9 , and 8 9 has N 2 end with 2 1 . Since there are 4 in 1 0 0 , 1 0 0 0 0 0 has 4 0 0 0 .