Consider a perfect square N having 1 as the first digit (reading from left).
Determine the minimum value of N such that it remains a perfect square when 1 is replaced by 2.
Find, if possible, the next higher value of N less than 1010 with this property.
Otherwise, prove its non-existence.
Note: Computer-program based methodology apart from semi-analytic solution is permissible.
Let A^2=N (square beginning with 1) and B^2 be the square beginning with 2.
Let P be the number so that B-A = 10^P. Then N must satisfy 10^P < N < 2*10^P.
A and B have the same parity so there are natural numbers C and D such that C+D=B and C-D=A.
Then (C+D)^2 - (C-D)^2 = 10^P. This simplifies to C*D = (10^P)/4 = 2^(P-2) * 5^P. So then C and D are a factorization of 2^(P-2) * 5^P.
If C and D are both multiples of 10, then so will A and B which makes for a trivial multiple of a smaller solution.
So to find nontrivial solutions one of C or D must be a pure power of 2 or 5.
For the rest of this solution I will focus on nontrivial solutions.
Substituting C*D = 2^(P-2) * 5^P into 10^P < N < 2*10^P yields 4CD < (C-D)^2 < 8CD. The compound inequality can be split into two individual inequalities 4CD < (C-D)^2 and (C-D)^2 < 8CD.
Expressing each in terms of the ratio C/D yields 8<(C/D-3)^2 and (C/D-5)^2<24. Since C is larger than D then C/D>1 is a third inequality.
Combining all three inequalities yields 3+sqrt(8) < C/D and C/D < 5+sqrt(24).
Next, multiply both inequalities by D^2 and substitute CD=(10^P)/4 to make (3+sqrt(8))*D^2 < (10^P)/4 and (10^P)/4 < D^2*(5+sqrt(24)).
Then solve for D to get [10^(P/2)]/[2*sqrt(5+sqrt(24))] < D < [10^(P/2)]/[2*sqrt(3+sqrt(8))]
If one of C and D is a power of 2, then it must be D since factors that are powers of 2 are much smaller than power of 5 in the other factor. So much smaller that C/D fails the compound inequality 3+sqrt(8) < C/D < 5+sqrt(24).
Then either C or D is a power of 5. Then there is either the case C=5^(P-J) and D=2^(P-2)*5^J or the case D=5^K and C=2^(P-2)*5^(P-K)
If D=5^K then [10^(P/2)]/[2*sqrt(5+sqrt(24))] < 5^K < [10^(P/2)]/[2*sqrt(3+sqrt(8))]
This simplifies to P*ln(10)/(2*ln(5)) - ln(2*sqrt(5+sqrt(24)))/ln(5) < K < P*ln(10)/(2*ln(5)) - ln(2*sqrt(3+sqrt(8)))/ln(5)
Expressed numerically, 0.71534*P-1.14286 < K < 0.71534*P-0.97830
If D=2^(P-2)*5^J then [10^(P/2)]/[2*sqrt(5+sqrt(24))] < 2^(P-2)*5^J < [10^(P/2)]/[2*sqrt(3+sqrt(8))]
This simplifies to P*ln(5/2)/(2*ln(5)) + ln(2)/ln(5) - ln(sqrt(5+sqrt(24)))/ln(5) < J < P*ln(5/2)/(2*ln(5)) + ln(2)/ln(5) - ln(sqrt(3+sqrt(8)))/ln(5)
Expressed numerically, 0.28466*P-0.28151 < J < 0.28466*P-0.11695
For a given P, the ranges for J and K are always smaller than 1 so for any P there is at most two possible N, from one possible J and one possible K.
Manually checking for P=2 to 9 finds one valid K and two valid J values for corresponding P values.
P=4, J=1, D=20, C=125, A=105, B=145, N=11025
P=7, K=4, D=625, C=4000, A=3375, B=4625, N=11390625
P=8, J=2, D=1600, C=15625, A=14025, B=17225, N=196700625
Then the first three nontrivial values of N (less than 10^10) are 11025, 11390625, and 196700625.
If we are to include the trivial multiples then the values of N (less than 10^10) start with 11025, 1102500, 11390625, 110250000, 196700625, 1139062500
Edited on April 11, 2022, 12:12 pm