D A D B O B = 0 . H U L K H U L K H U L K …
In the above cryptogram B O B is divided by D A D to obtain a recurring decimal 0 . H U L K H U L K H U L K … which has repeating period of four digits ( H U L K ) . Furthermore, g cd ( B O B , D A D ) = 1 .
Compute B + O + D + A + H + U + L + K .
Details And Assumptions:
B , O , D , A , H , U , L , K represent distinct digits.
B O B and D A D are three digit numbers.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Hi! I wonder how you determine and count huge prime numbers. With no help and no resources, I am unable to solve a question. Could you tell me how much time you need to count total prime number of up to 1110987654321?
Log in to reply
Hi Lu, see my solution to this problem ... There it took me about one hour (using Java) to count prime numbers to a value about 10 percent higher yet.
I'll run my program and let you know what I found :) For sure the number 1110987654321 itself is not prime; it is a multiple of 3.
Here's the short to type, brute force BASH in Python!
It uses a bit of reduction by Math, that 0 . H U L K H U L K . . . = 9 9 9 9 H U L K .
1 2 3 4 5 6 7 8 9 |
|
It prints the answer 3 3 .
And I feel so happy, people haven't forgotten Mistakes Give Rise To Problems ,
because Julian Poon has posted Mistakes do give rise to Problems
@Julian Poon , thank you very much ^_^
Log in to reply
Even I must be thanked :/
Log in to reply
Thank you @Nihar Mahajan , the 'Marvel lover' ;)
A simplification could be : permutations('0123456789', 8) in stead of permutations('0123456789')
x = 0.HULKHULKHULK...
10000 x = HULK.HULKHULKHULK...
9999 x = HULK
x = 9 9 9 9 H U L K = D A D B O B {Not visualizing simplification allowed.}
With B, D, H from 1 to 9, and O, U, L, K and also A from 0 to 9, where among all alphabets are not equal, AND 1009899 B + 99990 O = (1000 H + 100 U + 10 L + K)(101 D + 10 A):
1 2 |
|
6 0 6 2 1 2 = 3 0 3 1 0 6 but not applicable in the context for verification.
gcd (212, 606) = 1 wanted means 6 0 6 2 1 2 = 0 . 3 4 9 8 3 4 9 8 3 4 9 8 . . . wanted, although quite unusual.
2 + 1 + 6 + 0 + 3 + 4 + 9 + 8 = 33
Answer: 3 3
I used a Lua program where it prints a list of factors which shows a recurring 4-digit to compute this and i tried the first result with unique digits: BOB = 212 DAD = 606 0.HULK = 0.3498... Then computed for bodahulk(w/c i forgot to include in my program): 2+1+6+0+3+4+9+8=33
Problem Loading...
Note Loading...
Set Loading...
I tried to narrow down the possibilities a lot before crunching numbers!
The equation can be written as H U L K ⋅ D A D = B O B ⋅ 9 9 9 9 . Since 1 0 1 ∣ 9 9 9 9 is a prime factor, H U L K or D A D should be a multiple of 101. But it can't be H U L K , for four-digit multiples of 101 are of the form X Y ⋅ 1 0 1 = X Y X Y , with repeating digits. Therefore D A D is a multiple of 101. It follows immediately that D A D = 1 0 1 ⋅ D , and A = 0 . The equation becomes H U L K ⋅ D = B O B ⋅ 9 9 . From the fact that B O B / D A D < 1 it follows that B ≤ D . In fact, since O > A = 0 , we know that B < D . This immediately rules out D = 1 and B = 9 .
Further analysis of prime factors shows that 1 1 ∣ H U L K . The quotient H U L K / 1 1 = ? ? K ends in the same digit as H U L K . This gives ? ? K ⋅ D = B O B ⋅ 9 ; because K = B it follows that D = 9 and B ≤ 8 .
It is also easy to see that K , D , B = 5 : if K or D were equal to 5, then B should be 0 or 5, which is not allowed. And B can only be 5 if either K or D is 5.
We also see that D should be a divisor of B O B ⋅ 9 . This means that D ∣ B O B , unless D = 6 , in which case we only require that B O B is even. (Why is D = 3 no exception? We are told that the gcd of B O B and D A D = 1 0 1 ⋅ D is not 1, so these numbers have a common factor. It can't be 101, because O = 0 ; if D = 3 , the only possible common factor is 3, so that in this case also D ∣ B O B .)
This condition of divisibility can be worked out in more detail.
D = even : Then B must also be even. Combined with B < D , we rule out D = 2 and B = 8 . Moreover, for D = 4 we have B O B = 1 0 1 B + 1 0 O ≡ B + 2 O ≡ 0 mod 4, showing that B is a multiple of four if and only if O is even; for D = 8 this condition can be sharpened.
D = 3 : We have B O B ≡ 2 B + O ≡ 0 mod 3.
D = 7 : We have B O B = 1 0 1 B + 1 0 O ≡ 3 B + 3 O ≡ 3 ( B + O ) ≡ 0 mod 7, so that B + O = 7 or 1 4 .
With this information, the possible values for B , O , D are severely limited! I generated all 29 remaining possibilities by hand, and used a calculator to find H U L K = B O B ⋅ 9 9 / D :
The only case where there is no overlap in digits within H U L K or between H U L K and D , B O B is the combination D = 6 , B O B = 2 1 2 , and H U L K = 3 4 9 8 . The total of these digits, together with A = 0 , is 3 3 .
Extra: The condition that gcd ( B O B , D A D ) = 1 is essential. From the discussion above, it played a role when D = 3 . Indeed, if we allow D = 3 but 3 ∣ B O B , we find an additional solution D = 3 , B O B = 2 4 2 and H U L K = 7 9 8 6 .