Find the smallest perfect square whose decimal representation begins and ends with three 4's.
let the number between the 4's be x and have d digits
then we have
444*10^(d+3)+1000x+444=n^2
where n is a positive integer
solving for x we get
x=(n^2444444*10^(d+3))/1000
now in order for x to be an integer we need
n^2=444 mod 1000
taking modular square root we get
n=538 mod 1000
we also have that
10^(d1)<=x<10^d
10^(d1)<=(n^2444444*10^(d+3))/1000<10^d
10^(d+2)<=n^2444444*10^(d+3)<10^(d+3)
444+444*10^(d+3)+10^(d+2)<=n^2<=444+445*10^(d+3)
so we need to find the smallest d which given the range above on n, allows for a value
of n which is 538 mod 1000
this first happens at d=6
giving n=666538
n^2=444272905444

Posted by Daniel
on 20190802 07:22:35 