Concatenating two consecutive integers
183 and 184
we get a six-digit number
183184, equalling
square of 428.List similar pairs, below
500,000 (final product).
How about the same task with a pair of a consecutve numbers
in a decreasing order?
Please provide a similar list (same constraints).
Lets call the first of the consecutive integers N, and call the square S^2. And the number of digits D (D=3 for this puzzle).
Then (10^D + 1) * N + 1 = S^2.
Let P be some prime factor of 10^D + 1.
Now take the first equation mod P: 1 = S^2 mod P
Rearrange a little bit: (S-1) * (S+1) = 0 mod P
Now because P is prime the only solutions (mod P) are the obvious solutions: S = 1 mod P and S = P-1 mod P.
(I am assuming 10^D+1 is squarefree)
From this we can take each prime factor of 10^D + 1 and create a system of residues to solve, which can be done with the Chinese remainder theorem.
The system with all remainders equal to 1 is discarded since all that does is make S=1.
Similarly, the system with all remainders 1 less than the respective primes (p-1 for each prime p) is discarded since all that does is make S=10^D, which is too large.
So for this puzzle D=3: 10^D + 1 = 1001 = 7*11*13
Then six candidates for S emerge:
S=6 mod 7; S=1 mod 11; S=1 mod 13 yields S=573: S^2=328329
S=1 mod 7; S=10 mod 11; S=1 mod 13 yields S=274: S^2=75076 (leading zero)
S=6 mod 7; S=10 mod 11; S=1 mod 13 yields S=846: S^2=715716
S=1 mod 7; S=1 mod 11; S=12 mod 13 yields S=155: S^2=24025 (leading zero)
S=6 mod 7; S=1 mod 11; S=12 mod 13 yields S=727: S^2=528529
S=1 mod 7; S=10 mod 11; S=12 mod 13 yields S=428: S^2=183184
If we go further to D=4: 10^4+1 = 10001 = 73*137
Two candidates:
S=1 mod 73; S=136 mod 137 yields S=2191: S^2=4800481 (leading zero)
S=72 mod 73; S=1 mod 137 yields S=7810: S^2=60996100
Lets go higher than Charlie's program went and try D=8: 10^8+1 = 100000001 = 17*5882353
S=1 mod 17; S=1 mod 5882353 yields S=47058823: S^2=2214532822145329
S=16 mod 17; S=5882352 mod 5882353 yields S=52941178: S^2=2802768328027684