All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Digit Replacement and Square Settlement (Posted on 2022-04-11) Difficulty: 3 of 5
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.

No Solution Yet Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Hints/Tips Going much further | Comment 4 of 5 |
The analytic work in my previous comment very tightly restricts the search space for nontrivial solutions.  So even a slow interpreter like UBASIC can find larger solutions quickly.  This program quickly finds 11 nontrivial solutions up to 30 digits.
    5   print=print+"output.txt"
   10   for P=2 to 29
   20   J=ceil(0.28466*P-0.28151):Jhigh=floor(0.28466*P-0.11695)
   30   if J<>Jhigh then 100
   40   D=2^(P-2)*5^J:C=5^(P-J)
   50   B=C+D:A=C-D:N=A*A:M=B*B
   60   print "P=";P;"J=";J;"D=";D;"C=";C
   70   print "A=";A;"B=";B:print "N=";N:print "M=";M
   80   print
  100   K=ceil(0.71534*P-1.14286):Khigh=floor(0.71534*P-0.97830)
  110   if K<>Khigh then 200
  120   D=5^K:C=2^(P-2)*5^(P-K)
  130   B=C+D:A=C-D:N=A*A:M=B*B
  140   print "P=";P;"K=";K;"D=";D;"C=";C
  150   print "A=";A;"B=";B:print "N=";N:print "M=";M
  190   print
  200   next P
  210   print=print
  220   end
The output:
P= 4 J= 1 D= 20 C= 125 
A= 105 B= 145 
N= 11025 
M= 21025 

P= 7 K= 4 D= 625 C= 4000 
A= 3375 B= 4625 
N= 11390625 
M= 21390625 

P= 8 J= 2 D= 1600 C= 15625 
A= 14025 B= 17225 
N= 196700625 
M= 296700625 

P= 11 J= 3 D= 64000 C= 390625 
A= 326625 B= 454625 
N= 106683890625 
M= 206683890625 

P= 14 K= 9 D= 1953125 C= 12800000 
A= 10846875 B= 14753125 
N= 117654697265625 
M= 217654697265625 

P= 15 J= 4 D= 5120000 C= 48828125 
A= 43708125 B= 53948125 
N= 1910400191015625 
M= 2910400191015625 

P= 18 J= 5 D= 204800000 C= 1220703125 
A= 1015903125 B= 1425503125 
N= 1032059159384765625 
M= 2032059159384765625 

P= 21 K= 14 D= 6103515625 C= 40960000000 
A= 34856484375 B= 47063515625 
N= 1214974502984619140625 
M= 2214974502984619140625 

P= 22 J= 6 D= 16384000000 C= 152587890625 
A= 136203890625 B= 168971890625 
N= 18551499821386962890625 
M= 28551499821386962890625 

P= 28 K= 19 D= 19073486328125 C= 131072000000000 
A= 111998513671875 B= 150145486328125 
N= 12543667064709171295166015625 
M= 22543667064709171295166015625 

P= 29 J= 8 D= 52428800000000 C= 476837158203125 
A= 424408358203125 B= 529265958203125 
N= 180122454512672059478759765625 
M= 280122454512672059478759765625

Edited on April 11, 2022, 12:22 pm
  Posted by Brian Smith on 2022-04-11 12:19:25

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information