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

Home > Probability
Three Digit Travail (Posted on 2014-12-26) Difficulty: 3 of 5
Let us consider a duodecimal prime number which when re-interpreted as a base ten positive integer is a composite number. As an example, (45)12 is equal to (53)10 and therefore a prime number. However, (45)10 is evidently a composite number.

Determine the probability an integer chosen at random from (100)12 to (BBB)12 inclusively is a prime number in the duodecimal system, but is composite when re-interpreted as a base ten number.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
 For v = fromBase("100", 12) To fromBase("bbb", 12)
   overct = overct + 1
   If prmdiv(v) = v Then
     r$ = base$(v, 12)
     dv = Val(r$)
     good = 1
     For i = 1 To Len(r$)
       If InStr("0123456789", Mid(r$, i, 1)) = 0 Then good = 0: Exit For
     Next
     If good = 1 And prmdiv(dv) < dv Then
       Text1.Text = Text1.Text & r$ & Str(v) & crlf
       ct = ct + 1
     End If
   End If
 Next v
 g = gcd(ct, overct)
 
 Text1.Text = Text1.Text & crlf & ct & Str(overct) & Str(ct / g) & Str(overct / g) & mform(ct / overct, "##0.000000000") & crlf


finds that 90 out of the 1584 cases fit the criterion, for a probability of 5/88 ~= 0.056818182.


base-12 prime         base-12 number
base-10 composite     translated to decimal
                      for verification of primality
105                     149
111                     157
117                     163
125                     173
141                     193
145                     197
147                     199
171                     229
175                     233
195                     257
205                     293
217                     307
221                     313
225                     317
237                     331
255                     353
267                     367
285                     389
291                     397
295                     401
301                     433
315                     449
321                     457
325                     461
327                     463
357                     499
365                     509
375                     521
377                     523
391                     541
415                     593
427                     607
435                     617
437                     619
447                     631
455                     641
465                     653
471                     661
481                     673
485                     677
497                     691
507                     727
511                     733
517                     739
527                     751
531                     757
535                     761
545                     773
565                     797
575                     809
585                     821
591                     829
611                     877
615                     881
637                     907
655                     929
665                     941
675                     953
687                     967
695                     977
705                     1013
711                     1021
721                     1033
735                     1049
737                     1051
745                     1061
747                     1063
767                     1087
771                     1093
775                     1097
785                     1109
791                     1117
801                     1153
817                     1171
825                     1181
835                     1193
841                     1201
851                     1213
855                     1217
865                     1229
867                     1231
871                     1237
901                     1297
905                     1301
921                     1321
927                     1327
955                     1361
965                     1373
987                     1399
995                     1409

stats:

90 1584 5 88  0.056818182

  Posted by Charlie on 2014-12-26 14:58:12
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 (7)
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