Count Count Count

Find the number of ordered septuples of non-negative integers ( x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 ) \left(x_1, x_2, x_3, x_4, x_5,x_6,x_7\right) such that 0 x i 7 0\le x_i\le 7 for all i i and 5 5 divides i = 1 7 3 x i \displaystyle \sum_{i=1}^7 3^{x_i} .


The answer is 419328.

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.

1 solution

Let f ( n ) f(n) denote the number of n n- tuples ( x 1 , . . . , x n ) (x_1, . . . ,x_n) such that 0 x 1 , . . . , x n 7 0\le x_1, ... , x_n ≤ 7 and 5 i = 1 n 3 x i \displaystyle 5\mid\sum_{i=1}^n 3^{x_i} .

To compute f ( n + 1 ) f(n+1) from f ( n ) f(n) , we note that given any n n- tuple ( x 1 , . . . , x n ) (x_1, ... , x_n) such that 0 x 1 , . . . , x n 7 0\le x_1, ... , x_n ≤ 7 and 5 i = 1 n 3 x i \displaystyle 5\nmid\sum_{i=1}^n 3^{x_i} , there are exactly two possible values for x n + 1 x_{n+1} such that 0 x n + 1 7 0 \le x_{n+1}\le 7 and 5 i = 1 n + 1 3 x i \displaystyle 5\mid\sum_{i=1}^{n+1} 3^{x_i} , because 3 n 1 , 3 , 4 , 2 , 1 , 3 , 4 , 2 ( m o d 5 ) 3^n \equiv 1, 3, 4, 2, 1, 3, 4, 2 \pmod{5} for n = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 n = 0, 1, 2, 3, 4, 5, 6, 7 respectively.

Also, given any valid ( n + 1 ) (n + 1)- tuple ( x 1 , . . . , x n + 1 ) (x_1, . . . , x_{n+1}) , we can remove x n + 1 x_{n+1} to get an n n- tuple ( x 1 , . . . , x n ) (x_1, . . . , x_n) such that such that 0 x 1 , . . . , x n 7 0\le x_1, ... , x_n ≤ 7 and 5 i = 1 n 3 x i \displaystyle 5\nmid\sum_{i=1}^n 3^{x_i} ., so these are in bijection.

There are a total of 8 n 8^n n n- tuples, f ( n ) f(n) of which satisfy 5 i = 1 n 3 x i \displaystyle 5\mid\sum_{i=1}^n 3^{x_i} , so there are 8 n f ( n ) 8^n - f(n) for which 5 i = 1 n 3 x i \displaystyle 5\nmid\sum_{i=1}^n 3^{x_i} .

Therefore, f ( n + 1 ) = 2 ( 8 n f ( n ) ) f(n + 1) = 2(8^n - f(n)) .

We now have f ( 1 ) = 0 , f ( 2 ) = 2 ( 8 1 0 ) = 16 , f ( 3 ) = 2 ( 8 2 16 ) = 96 , f ( 4 ) = 2 ( 8 3 96 ) = 832 , f ( 5 ) = 2 ( 8 4 832 ) = 6528 , f ( 6 ) = 2 ( 8 5 6528 ) = 52480 , f ( 7 ) = 2 ( 8 6 52480 ) = 419328 f(1) = 0, f(2) = 2(8^1 - 0) = 16, f(3) = 2(8^2 - 16) = 96,\\ f(4) = 2(8^3 - 96) = 832, f(5) = 2(8^4 - 832) = 6528,\\ f(6)=2(8^5-6528)=52480, f(7)=2(8^6-52480)=\boxed{419328} .

Great solution. Upvote confirmed!

Adam Phúc Nguyễn - 5 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...