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

Home > Numbers
Dicey numbers (Posted on 2009-03-27) Difficulty: 3 of 5
A small number of standard dice were thrown. The total of the spots on the tops was a perfect square. Then the digits that represent each of the top numbers were placed in a row in increasing order to spell out a rather large number (a given digit may appear more than once, as in 12224).

The same thing was repeated with twice as many dice and again the total number of pips was a perfect square and a number formed by using the digits that represent the pips in ascending order was the square of the first number formed that way.

What were the two numbers formed by the digits representing the pips (the first number and its square)?

  Submitted by Charlie    
No Rating
Solution: (Hide)
 33333334        1111111155555556
 
 found by
 
 100   dim H(30)
 200
 300   gosub *AddOne(1)
 400
 500   end
 600
 700   *AddOne(Lvl)
 710   local I
 800   if Lvl=1 then St=1:else St=H(Lvl-1)
 900   for I=St to 6
1000    Tot=Tot+I
1100    Num=Num*10+I
1200
1300    H(Lvl)=I
1400    Sr=int(sqrt(Tot)+0.5)
1500    if Sr*Sr=Tot then
1600      :Num2=Num*Num
1700      :if Num2<999999999999999999999999999999999999 then
1800       :N$=cutspc(str(Num))
1900       :N2$=cutspc(str(Num2))
2000       :if len(N2$)=2*len(N$) then
2100       :Tot2=0
2200       :Good=1
2300       :for J=1 to len(N2$)
2400       :Tot2=Tot2+val(mid(N2$,J,1))
2500       :if J>1 then if mid(N2$,J,1)<mid(N2$,J-1,1) then Good=0:endif:endif
2600       :next
2700       :if Good then
2800       :Sr=int(sqrt(Tot2)+0.5)
2900       :if Sr*Sr=Tot2 then
3000       :print Num,Num2
3100       :endif
3200       :endif
3300       :endif
3400      :endif
3500    :endif
3600    if Lvl<18 then gosub *AddOne(Lvl+1)
3700
3800    Num=Num\10
3900    Tot=Tot-I
4000   next I
4100   return 


Enigma No. 1523, "Dicey numbers", by Susan Denham, 
New Scientist, 6 December 2008, page 48.				

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Generalized solutionDaniel2009-03-29 03:10:33
Solutionre(2): edge of darkness / solution (pattern found)Dej Mar2009-03-28 23:24:46
re: edge of darkness / solution (pattern found)Daniel2009-03-28 00:22:38
edge of darkness / solutioned bottemiller2009-03-27 18:16:40
Got too bigJer2009-03-27 13:18:45
A starting observation.Jer2009-03-27 12:56:37
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