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

 Powerful Couple (Posted on 2011-03-16)
(A) For a base ten positive integer P drawn at random between 10 and 99 inclusively, determine the probability that the first two digits (reading left to right) in the base ten expansion of 2P is equal to P-1.

(B) For a base ten positive integer P drawn at random between 10 and 99 inclusively, determine the probability that the first two digits (reading left to right) in the base ten expansion of 6P is equal to P-1.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution using Frink (spoiler) | Comment 1 of 6

I have begun exploring the programming language called Frink, available on the web for free. It has the extended-precision capabilities of UBASIC but is more amenable to structured programming and does not need to run in DOS.  The latter is an advantage for ease of use under Windows 7, and also in the use of longer filenames than the DOS's 8 + 3 format, though there doesn't seem to be a direct capability of writing to text files--only to a text window whose contents can be copied to wherever you want. The program file, any input files, and output graphics files, though, take advantage of the file name freedom.

Also, most Frink programs can be run without change on Android devices. Limitation is mostly based on memory usage, say for large graphics.

Here's the Frink solution:

setPrecision[100]
for p = 10 to 99
{
v=2^p
first2=substr["\$v",0,2]
v1=eval[first2]
v2=p-1
if v1==v2 then println["\$p "+" \$v"]
}
println [""]
for p = 10 to 99
{
v=6^p
first2=substr["\$v",0,2]
v1=eval[first2]
v2=p-1
if v1==v2 then println["\$p "+" \$v"]
}

The results, annotated manually, are:

` P  2^P21  209715235  3435973836876  75557863725914323419136`
` P  6^P17  1692665944473638  37131929274565927966219016601664  63340286662973277706162286946811886609896461828096`

As there are 90 integers between 10 and 99 inclusive, each of the requested probabilities is 3/90 = 1/30.

Edited on March 16, 2011, 1:14 pm
 Posted by Charlie on 2011-03-16 13:08:32

 Search: Search body:
Forums (4)