for the 2nd part 1st
ending with 4444 it is 10000n + 4444= 4( 2500n + 1111)
4 is a perfect square and 2500n + 1111 mod 4 = 3
as no square mod 4 can be 3 so 2500n + 1111 cannot be a perfect
square. so no square can end with 4444.
now for the 1st part
we have n say x^2 mod 1000 = 444
1000 = 8 * 125 and 8 and 125 are copimes
so x^^2 mod 8 = 4
and x^2 mod 125 = 444 mod 125 = 69
for the case x^2 mod 8
x has to be even and if x mod 4 = 0 then x^2 mod 8 = 0
so x mod 4 = 2
check (4n+2) ^2 = 16n^2 + 16n + 4 = 4 mod 8
now we need to solve
x^2 mod 125 = 69 and as 125 = 5^3 so we solve
x^2 = 4 mod 5
and x^2 = 19 mod 25
we sta69rt with 4 x^2 = 4 mod 5 and then x^2 = 19 mod 25 and
finally x^2 = 69 mod 125
x^2 = 4 mod 5 has solution x= 2 or 3 mod 5
we check for x = 2 mod 5 and then for x = 3 mod 5
First let us check for x = 2 mod 5
x= 2 mod 5
=> x = 5k + 2 mod 25
so x^2 mod 25 = 20k + 4 = 19 mod 25
or 20 k = 15 mod 25
or 4k = 3 mod 5
so k = 2 mod 5
so x = 12 mod 25
so x = 25 m + 12 mod 125
so x^2 = 600 m + 144 mod 125 = 69 mod 125
or 600 m = - 75 mod 125 = 50 mod 125
so 12 m = 1 mod 5 or 2m = 1 mod 5 or m = 3
so x = 87 mod 125
x= 2 mod 4
thsese 2 give x = 462 or – 38 mod 500
Now let us solve for x = 3 mod 5
x= 3 mod 5
=> x = 5k + 3 mod 25
so x^2 mod 25 = 30k + 9 = 19 mod 25
or 30 k = 10 mod 25
or 6k = 2 mod 5
so k = 2 mod 5
so x = 13 mod 25
so x = 25 m + 13 mod 125
so x^2 = 650 m + 169 mod 125 = 69 mod 125
or 650 m = - 100 mod 125 = 25 mod 125
so 25m = 25 mod 125 or m = 1
so x =38 mod 125
x= 2 mod 4
these 2 give x = 38 mod 500