Pages

Bookmark and Share
Showing posts with label digit. Show all posts
Showing posts with label digit. Show all posts

Friday, September 7, 2018

Cube sum of digits

Find all integers that is equal to the cube of sum of its digits.

Solution

Clearly 0 satisfies the problem statement, and negative numbers cannot satisfy. So now we may assume that the integer is positive.

Suppose $N = a_1 \dots a_d$ where each $a_i$ is a single digit, and $a_1 \neq 0$. Because $N \geq {10}^{d-1}$ and $N = (a_1 + \dots + a_d)^3 \leq (9d)^3$ so we must have: $$10^{d-1} \leq 9d^3 $$

For large $d$ this inequality fails to hold. In fact, it's only true for $d \leq 4$. So $N$ is a 4-digit number, which is also a cube. Therefore $N \leq 21^3$ because $22^3 > 10^5$.

Now consider modulo 9: we know that $N \equiv (a_1 + \dots + a_d) \mod 9$ so: $$ N = (a_1 + \dots + a_d)^3 \equiv N^3 \mod 9$$ Among all the residues modulo 9, only 0, 1, 8 satisfy $x \equiv x^3 \mod 9$. Therefore $N \equiv 0, 1, 8 \mod 9$.

So now our candidates are: $N = 1^3, 8^3, 10^3, 17^3, 18^3$. By inspection, only $N = 1^3 = 1, 8^3 = 512, 17^3 = 4913, 18^3 = 5832$ satisfy.

Sunday, June 12, 2011

Supersum

For a natural number $n$, the supersum of $n$ is defined as the sum of possible combinations that we can obtain by deleting digits of $n$, calculated as modulo 9. For example, the supersum of 1234 is:

No deletions: 1234 +
Deleting 1 digit: 123 + 134 + 234 + 124
Deleting 2 digits: 12 + 13 + 14 + 23 + 24 + 34 +
Deleting 3 digits: 1 + 2 + 3 + 4

$ = 8 \mod 9$

If $n$ is a 2011-digit number, and $s$ is its supersum, show that $s-n$ is divisible by 9.

Friday, October 9, 2009

Room and Lights Game

This problem is identical to this one but reworded for better clarity.

Alice is playing a game against Bob and Charlie. In a room, there are 27 lights with individual switches, some of them could be turned on or off. Bob enters the room while Charlie waits outside. Alice will tell Bob a number from 1 to 27. Bob then is allowed to flip at most 3 switches if he wishes. Then Bob exits and Charlie enters the room. He has to, upon examining the lights, guess the number that Alice told Bob. Neither Bob nor Charlie knows the configuration of the lights before Bob entered the room.

How can Bob and Charlie agree on a strategy to win this game?

Harder version: 15 lights, but Alice tells Bob a number from 1 to 16, and Bob can only flip at most one switch.