Thread Rating:

Poll

18 votes (51.42%)
13 votes (37.14%)
5 votes (14.28%)
2 votes (5.71%)
11 votes (31.42%)
3 votes (8.57%)
6 votes (17.14%)
5 votes (14.28%)
10 votes (28.57%)
8 votes (22.85%)

35 members have voted

ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 5165
January 10th, 2022 at 6:30:07 PM permalink

There are two answers: (3 - sqrt(5)) / 2, and 1

If p >= 1/2, the probability of winning by going for 1 the first time and 2 the second time is p; the probability of successfully going for 2 the first time, which is an automatic win since you can go for 1 the second time, is p, and even if it is missed, there is a p/2 chance of being successful the second time and winning in overtime, so the overall winning probability by going for 2 the first time > p -- unless p = 1, in which case, going for 2 the second time is always successful, so it doesn't matter what is done the first time.

If p < 1/2, the probability of winning by going for 1 the first time and 2 the second time = p, but the probability of winning by going for 1 both times = 1/2, so going for 1 the first time has a win probability of 1/2. The probability of winning by going for 2 the first time is p + (1 - p) p / 2 = p + p/2 - p^2/2 = p (3 - p) / 2. The two are equal when 3p - p^2 = 1; the only solution between 0 and 1/2 is 3/2 +/- sqrt(5)/2, or about 38.1966%.

Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1404
  • Posts: 23739
January 11th, 2022 at 6:54:04 AM permalink
Congratulations to ChesterDog, ksdjdj, Ace2, and ThatDonGuy -- I agree!
It's not whether you win or lose; it's whether or not you had a good bet.
Gialmere
Gialmere
Joined: Nov 26, 2018
  • Threads: 42
  • Posts: 2245
Thanks for this post from:
charliepatrick
January 19th, 2022 at 8:17:44 AM permalink


Find a nine digit number, using the numbers 1 to 9, and using each number once without repeats, such that; the first digit is a number divisible by 1. The first two digits form a number divisible by 2; the first three digits form a number divisible by 3 and so on until we get a nine digit number divisible by 9.

You might try, for example, the number 923,156,784. But this number doesn't work ó the first three digit number, 923, is not divisible by 3.

Can you find a nine digit number that works?
Have you tried 22 tonight? I said 22.
charliepatrick
charliepatrick
Joined: Jun 17, 2011
  • Threads: 35
  • Posts: 2518
Thanks for this post from:
Gialmere
January 19th, 2022 at 10:39:05 AM permalink
Here is a logical way to get to the answer.

(2,4,6,8) Since the first two digits form an even number it follows the second digit must be even. Similar logic applies for positions 4,6 and 8. Hence the final nine digit number is formed from odd,even,odd...odd,even,odd digits.
(3,6,9) The first three digits for a number divisible by three, so the sum of the first three digits is divisible by three. Similarly digits 4-6 and 7-9 have the same property.
(5) The first five digits are divisible by 5, so the middle digit has to be a "5"; this means the three digits must be 258 456 654 or 852 as their total is divisible by 3.

Looking at the four-digit number, the third digit will always be odd. Since the hundreds are divisible by 4, it is necessary for the tens and digits to be divisible by 4. So the number can be 12,32,72,92 or 16,36,76,96; thus the middle three have to be either 654 or 258.
Looking at the eight-digit number, the first six digits form an even number, so the hundreds part is divisible by 8. Thus the tens and units have to be divisible by 8, this means 16,96,32 or 72.

This means the number must be xxx65432y,xxx65472y,xxx25816x or xxx25896y.
Using the last three digits rule gives: xxx654321, xxx654327, xxx654723, xxx654729, xxx25816# (none), xxx258963
The remaining front three digits can be either way round, the even digit in position 2.

This gives ten numbers to check - the only factor left is whether the number is divisible by 7!
This gives only one solution 381 654 729.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 5165
Thanks for this post from:
Gialmere
January 19th, 2022 at 12:19:59 PM permalink

The second, fourth, sixth, and eighth digits must be even; since these are the only even digits, the others must be odd
The fifth digit must be 5
The first digit is odd and not 5
The second digit is even
The third digit is 1, 3, 7, or 9, and the sum of the first three digits is a multiple of 3
Since the third digit is odd, the fourth must be 2 or 6
The fourth digit is even, and since the sum of the first three digits is a multiple of 3, the sum of the second three digits is also a multiple of 3
Since the fourth and fifth digits must be 25 or 65, the sixth is either 8 (with 25) or 4 (with 65)
Skip 7 for now...
Since three of the four even digits are in place, place the remaining one in position 8
Digits 6-8 are a multiple of 8, with the middle digit odd and the first digit 4 or 8
The possibilities are 416, 432, 456, 472, 496, 816, 832, 856, 872, and 896
This leaves:
147258963
183654729
189654327
189654723
381654729
741258963
789654321
981654327
981654723
987654321
Of these, only 381654729 has its first 7 digits as a multiple of 7

Gialmere
Gialmere
Joined: Nov 26, 2018
  • Threads: 42
  • Posts: 2245
January 19th, 2022 at 4:51:41 PM permalink
Quote: charliepatrick

Here is a logical way to get to the answer.

(2,4,6,8) Since the first two digits form an even number it follows the second digit must be even. Similar logic applies for positions 4,6 and 8. Hence the final nine digit number is formed from odd,even,odd...odd,even,odd digits.
(3,6,9) The first three digits for a number divisible by three, so the sum of the first three digits is divisible by three. Similarly digits 4-6 and 7-9 have the same property.
(5) The first five digits are divisible by 5, so the middle digit has to be a "5"; this means the three digits must be 258 456 654 or 852 as their total is divisible by 3.

Looking at the four-digit number, the third digit will always be odd. Since the hundreds are divisible by 4, it is necessary for the tens and digits to be divisible by 4. So the number can be 12,32,72,92 or 16,36,76,96; thus the middle three have to be either 654 or 258.
Looking at the eight-digit number, the first six digits form an even number, so the hundreds part is divisible by 8. Thus the tens and units have to be divisible by 8, this means 16,96,32 or 72.

This means the number must be xxx65432y,xxx65472y,xxx25816x or xxx25896y.
Using the last three digits rule gives: xxx654321, xxx654327, xxx654723, xxx654729, xxx25816# (none), xxx258963
The remaining front three digits can be either way round, the even digit in position 2.

This gives ten numbers to check - the only factor left is whether the number is divisible by 7!
This gives only one solution 381 654 729.

link to original post


Quote: ThatDonGuy


The second, fourth, sixth, and eighth digits must be even; since these are the only even digits, the others must be odd
The fifth digit must be 5
The first digit is odd and not 5
The second digit is even
The third digit is 1, 3, 7, or 9, and the sum of the first three digits is a multiple of 3
Since the third digit is odd, the fourth must be 2 or 6
The fourth digit is even, and since the sum of the first three digits is a multiple of 3, the sum of the second three digits is also a multiple of 3
Since the fourth and fifth digits must be 25 or 65, the sixth is either 8 (with 25) or 4 (with 65)
Skip 7 for now...
Since three of the four even digits are in place, place the remaining one in position 8
Digits 6-8 are a multiple of 8, with the middle digit odd and the first digit 4 or 8
The possibilities are 416, 432, 456, 472, 496, 816, 832, 856, 872, and 896
This leaves:
147258963
183654729
189654327
189654723
381654729
741258963
789654321
981654327
981654723
987654321
Of these, only 381654729 has its first 7 digits as a multiple of 7


link to original post


Correct!!

Well done.


-----------------------------------------------------

Have you tried 22 tonight? I said 22.
charliepatrick
charliepatrick
Joined: Jun 17, 2011
  • Threads: 35
  • Posts: 2518
January 22nd, 2022 at 3:20:30 AM permalink
^ Seeing whether a (long) number is divisible by 7.
I gave this puzzle to a friend who managed to get to the penultimate stage, so has the ten numbers and now wants to know which are divisible by 7. Personally I just put them into a calculator (as I have a 12-digit calculator) but have since noticed you could use a simple trick even if you had an 8-digiti calculator.

When checking for a number being divisible by 9 you add up all the digits of the number, repeat the process if you get more than 9, and hey presto.
I was wondering, since 999999 is divisible by 7, whether you could stack the digits in groups of sixes for long numbers and so do the same. For instance 1000006 is divisible by 7 as is 1+6, similarly 2000005.
Interestingly it would also work for 11 using 99, 37 and 27 using 999, 13 using 999999.
Dieter
Administrator
Dieter
Joined: Jul 23, 2014
  • Threads: 9
  • Posts: 2561
January 22nd, 2022 at 4:24:11 AM permalink
Quote: charliepatrick


When checking for a number being divisible by 9 you add up all the digits of the number, repeat the process if you get more than 9, and hey presto.
link to original post



The repeated digit summing seems to work to test divisibility of a number by base-1. If you're comfortable working in octal and converting, this may be useful.

Converting from decimal to octal may be nontrivial for you, and most people I know only think somewhere between base 2 (binary) and base 16 (hexadecimal), with a few excursions up to base 36 and base 62 (generally for non-math reasons).

I do not have a proof that this always works, but it seems to, at least for octal, decimal, and hexadecimal. It wouldn't make much sense to try binary (everything is divisible by 1).

I do not currently have a number theorist in residence to bounce your grouping idea off of, but it is intriguing.
May the cards fall in your favor.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 5165
January 22nd, 2022 at 9:05:04 AM permalink
Quote: Dieter

Quote: charliepatrick


When checking for a number being divisible by 9 you add up all the digits of the number, repeat the process if you get more than 9, and hey presto.
link to original post



The repeated digit summing seems to work to test divisibility of a number by base-1. If you're comfortable working in octal and converting, this may be useful.

Converting from decimal to octal may be nontrivial for you, and most people I know only think somewhere between base 2 (binary) and base 16 (hexadecimal), with a few excursions up to base 36 and base 62 (generally for non-math reasons).

I do not have a proof that this always works, but it seems to, at least for octal, decimal, and hexadecimal. It wouldn't make much sense to try binary (everything is divisible by 1).

I do not currently have a number theorist in residence to bounce your grouping idea off of, but it is intriguing.
link to original post



I am pretty sure this is true for all bases >= 2. In fact, I am also pretty sure the sum of the digits of a base B number mod (B - 1) = the number mod (B - 1).
Start with 1; the number = 1 mod (B - 1), and the sum of its digits = 1 mod (B - 1).
When you add 1 to a number, if the last digit is not B - 1, you add 1 to the number and 1 to the sum of its digits; this adds 1 to both the number and the sum of its digits, so the number and the sum of its digits are still the same mod (B - 1).
If the last digit is B - 1, you subtract B - 1 from the last digit and all digits immediately to its left that are also B - 1, and add 1 to the rightmost digit that is not B - 1 (assume the leftmost digit is 0 if necessary). You subtract a multiple of B - 1, which does not affect the sum of the digits mod (B - 1), and add 1, which adds 1 to the sum, but you also added 1 to the number itself.
GM
GM
Joined: Jun 16, 2021
  • Threads: 0
  • Posts: 37
Thanks for this post from:
charliepatrick
January 22nd, 2022 at 1:52:40 PM permalink
Quote: charliepatrick

^ Seeing whether a (long) number is divisible by 7.

I gave this puzzle to a friend who managed to get to the penultimate stage, so has the ten numbers and now wants to know which are divisible by 7. Personally I just put them into a calculator (as I have a 12-digit calculator) but have since noticed you could use a simple trick even if you had an 8-digiti calculator.

When checking for a number being divisible by 9 you add up all the digits of the number, repeat the process if you get more than 9, and hey presto.
I was wondering, since 999999 is divisible by 7, whether you could stack the digits in groups of sixes for long numbers and so do the same. For instance 1000006 is divisible by 7 as is 1+6, similarly 2000005.
Interestingly it would also work for 11 using 99, 37 and 27 using 999, 13 using 999999.
link to original post


Yes, this idea works. If the number consisting of d 9s is divisible by k, then you can test for divisibility by k by splitting the decimal representation of your number into groups of d digits starting from the end, adding up these d digit numbers and repeating the process if the sum has more than d digits. The number you obtain is divisible by k if and only if the original number is divisible by k.

Fermat's Little Theorem implies that 10p-1-1, i. e., the number consisting of (p-1) 9s is divisible by p if p is a prime other than 2 or 5, so you can use groups of length p-1 to test for divisibility by p. For a lot of primes some divisor of p-1 will also work, but there are also primes like 7, 17, 19, 23 and 29, for which you have to use groups of length p-1.

  • Jump to: