during the process the sequence will exceed 10^k at some point. Since the second operation cannot

lead to an additional digit this must happen after a step of the first operation. So the prime

must be 100…001, 100…003, 100…007 or 100…009 at this point. Now another first operation would lead to

an even number, i.e. a non-prime. 100…001 cant be the subject for the second operation without

giving an non-prime, the others can if 300…001, 700…001, 900….001 are primes. But thats the

end neither the fist nor the second operation again can give another prime.

So the process is finite for every prime and since you start with a finite numbers of primes the whole process is finite. ]]>

64800000…0000031 if such a number exists. This number is +1 (mod 2, 3 and 5) and the digts 6, 4 and 8 are available for operation 1 for a long time.

Then add either a 6 or a pair of a 4 and an 8 in such a way that you add a 6 if the current number is +1 or +3 (mod 5)

and a 4 and an 8 if the current number is +4 (mod 5) to avoid a new number divisible by 5

So you can start with 6, 6, 6 (4+8 ist now forced), 4+8 (6 is now forced), 6, 6

and get the numbers 64800000…0000031, 64800000…0000037, ……0000043, …….0000049, …….0000053,

…..000061, …….00000067, …… These numbers are never divisible by 2, 3 or 5

Of course these numbers could be divisible by 7, but maybe you can also avoid reaching such a number ?

Then there is the second operation which is very limited (once the digits are sorted you have to wait for the next overflow to reuse it), but still can help when you are stucked.

I think I’m missing something

]]>7a: Bob can win by symmetrical play. Define a mapping of suits (e.g. spadeshearts, clubsdiamonds), and always play the card of same rank, and corresponding suit, as Alice’s last move.

9: Two things contribute to the 230 sums: pairs of multiples of three, and pairs of a 3n+1 and a 3n+2. That works out to n0(n0-1)/2 + n1n2 = 230. The problem is symmetric in n1 and n2, and we only have to figure out n0, so let’s start with n1n2 = 230 – n0(n0-1)/2, and n1+n2 = 30-n0. Requiring n1n2 to be positive leads to a quadratic equation implying n0<22, and more algebra and playing with bounds gives n0>20, so the number is 21 (specifically, 21, 5, and 4; or 21, 4, and 5).

]]>7a: Bob can win by symmetrical play. Define a mapping of suits (e.g. spadeshearts, clubsdiamonds), and always play the card of same rank, and corresponding suit, as Alice’s last move.

9: Two things contribute to the 230 sums: pairs of multiples of three, and pairs of a 3n+1 and a 3n+2. That works out to n0(n0-1)/2 + n1n2 = 230. The problem is symmetric in n1 and n2, and we only have to figure out n0, so let’s start with n1n2 = 230 – n0(n0-1)/2, and n1+n2 = 30-n0. Requiring n1n2 to be positive leads to a quadratic equation implying n020, so the number is 21 (specifically, 21, 5, and 4; or 21, 4, and 5).

]]>21 numbers of the original 30 numbers are divisible by 3.

]]>Minimum possible number of liars is 3. Let the persons having numbers 1 to 17 be all truth tellers. Their sum is 153. The remaining 3 persons with numbers 18, 19, 20 will lie and tell their numbers as 1, 1 and 1. The total sum will be 156.

]]>