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

Home > Probability
Square and Consecutive Settlement (Posted on 2010-09-10) Difficulty: 3 of 5
Determine the probability that for a base 11 perfect square P chosen at random between 1,000,000,000 (base 11) and A,AAA,AAA,AAA (base 11) inclusively, the five digit number formed by the last five digits of P (reading left to right) is precisely one more than the number formed by the first five digits.

See The Solution Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
list
   10   dim Dig(10)
   20   Strt=-int(-sqrt(11^9))
   30   Fin=int(sqrt(11^10-1))
   40   for Root=Strt to Fin
   50      Sq=Root*Root
   60      for I=0 to 9
   70         Dig(I)=Sq @ 11
   80         Sq=Sq\11
   90      next I
  100      N1=0
  110      for I=9 to 5 step -1
  120         N1=N1*11+Dig(I)
  130      next I
  140      N2=0
  150      for I=4 to 0 step -1
  160         N2=N2*11+Dig(I)
  170      next I
  180      if N2=N1+1 then print Root*Root
  185        :for I=9 to 0 step -1:print Dig(I);:if I=5 then print "   ";:endif
  186        :next:print
  190   next Root
  200   print:print Fin-Strt+1
OK
run
 2881864489
 1  2  4  9  8     1  2  4  9  9
 6484275625
 2  8  2  8  2     2  8  2  8  3
 6484597729
 2  8  2  8  4     2  8  2  8  5
 11528102161
 4  9  8  6  3     4  9  8  6  4
 18012055681
 7  7  0  3  3     7  7  0  3  4
 112492
OK

shows that 5 of the 112,492 perfect squares in the given range satisfy the condition, so the probability is 5/112,492.

The table printed shows the decimal representation of the square, followed by the base-11 representation. The middle of the latter is spaced farther than the other digits to highlight the two separate parts asked for by the puzzle.


  Posted by Charlie on 2010-09-10 14:16:29
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 (3)
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