Friendly Numbers

Level pending

A positive integer n n is called friendly if there exist two positive integers j j and k k such that:

  • j + k = n j+k= n

  • There exist two sequences { a i } i = 0 \{a_i\}_{i=0}^{\infty} and { b i } i = 0 \{b_i\}_{i=0}^{\infty} of integers (not necessarily positive) satisfying the following conditions. { a i = 0 for all i > j b i = 0 for all i > k i = 0 v a i b v i = 0 for all v { 1 , 2 , , n 1 } a 0 b 0 = a j b k = 1 \begin{cases} a_i=0 & \text{for all } i>j \\ b_i=0 &\text{for all } i>k \\ \displaystyle \sum_{i=0}^{v} a_i b_{v-i} = 0 & \text{for all } v \in \{1, 2, \cdots , n-1 \} \\ a_0b_0= a_jb_k= 1 \\ \end{cases}

Find the number of positive integers 1000 \leq 1000 which are not friendly.

Details and assumptions

  • As an explicit example, when n = 3 n=3 and j = 1 , k = 2 j=1, k=2 , the last condition reads: { a i = 0 for all i > 1 b i = 0 for all i > 2 a 0 b 0 = a 1 b 2 = 1 a 0 b 1 + a 1 b 0 = 0 a 0 b 2 + a 1 b 1 + a 2 b 0 = 0 \begin{cases} a_i=0 & \text{for all } i>1 \\ b_i=0 & \text{for all } i>2 \\ a_0b_0= a_1b_2= 1 \\ a_0b_1 + a_1b_0= 0 \\ a_0b_2 + a_1b_1 + a_2b_0= 0 \end{cases} It isn't hard to verify that the sequences { a 0 , a 1 , a 2 , a 3 , } = { 1 , 1 , 0 , 0 , } \{a_0, a_1, a_2, a_3, \cdots \} = \{1, 1, 0, 0, \cdots \} and { b 0 , b 1 , b 2 , b 3 , } = { 1 , 1 , 1 , 0 , 0 , } \{b_0, b_1, b_2, b_3, \cdots \} = \{1, -1, 1, 0, 0, \cdots \} satisfy all the conditions above, so 3 3 is a friendly number.

  • By definition, 1 1 and 2 2 are unfriendly numbers.


The answer is 10.

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 ( x ) = v = 0 a v x v f(x)= \displaystyle \sum \limits_{v=0}^{\infty} a_v x^v and g ( x ) = v = 0 b v x v g(x)= \displaystyle \sum \limits_{v=0}^{\infty} b_v x^v . Since a v = 0 a_v= 0 for all v > j v>j and b v = 0 b_v=0 for all v > k v>k , it follows that f ( x ) = v = 0 j a v x v f(x)= \displaystyle \sum \limits_{v=0}^{j} a_v x^v and g ( x ) = v = 0 k b v x v g(x)= \displaystyle \sum \limits_{v=0}^{k} b_v x^v . Consider h ( x ) = f ( x ) g ( x ) = ( v = 0 j a v x v ) ( v = 0 k b v x v ) . h(x) = f(x) \cdot g(x) = \left( \displaystyle \sum \limits_{v=0}^{j} a_v x^v \right) \left(\displaystyle \sum \limits_{v=0}^{k} b_v x^v \right). The constant term of h ( x ) h(x) is a 0 b 0 = 1 a_0b_0= 1 , and its leading coefficient (coefficient of x j + k = x n x^{j+k}= x^n ) is a j b k = 1 a_jb_k= 1 . Note that for all 1 v n 1 1 \leq v \leq n-1 , the coefficient of x v x^v in h ( x ) h(x) is m = 0 v a j b m v = 0 \displaystyle \sum \limits_{m=0}^{v} a_j b_{m-v} = 0 . Thus, h ( x ) = x n + 1 h(x)= x^n+1 . We thus conclude such a sequence exists if and only if the polynomial h n ( x ) = x n + 1 h_n (x) = x^n+1 is reducible over Z [ x ] \mathbb{Z}[x] .


Let n = 2 m N n= 2^m \cdot N , where N N is an odd integer. If N > 1 N>1 , h n ( x ) = x n + 1 = ( x 2 m ) N + 1 = ( x 2 m + 1 ) ( v = 0 N 1 ( 1 ) v ( x 2 m ) v ) , h_n(x)= x^n+1= \left( x^{2^m} \right) ^ N + 1 = \left( x^{2^m}+1 \right) \left( \displaystyle \sum \limits_{v=0}^{N-1} (-1)^v \left( x^{2^m} \right) ^v \right) , which is reducible over Z [ x ] \mathbb{Z}[x] . If N = 1 N=1 , n = 2 m n= 2^m for some m N m \in \mathbb{N} and h n ( x ) = x n + 1 = x 2 n 1 x n 1 = d 2 n Φ d ( x ) d n Φ d ( x ) , h_n(x)= x^n+1= \dfrac{x^{2n}-1}{x^n-1}= \dfrac{\displaystyle \prod \limits_{d|2n} \Phi_d (x)}{\displaystyle \prod \limits_{d|n} \Phi_d (x) }, where Φ d ( x ) \Phi_d (x) denotes the d th d^{\text{th}} cyclotomic polynomial. Note that the only divisor of 2 n = 2 m + 1 2n= 2^{m+1} which doesn't divide n = 2 m n= 2^m is 2 n 2n itself. Thus, all but one of the terms cancel out, leaving us with x n + 1 = Φ 2 n ( x ) x^n+1= \Phi_{2n} (x) . Since every cyclotomic polynomial is irreducible over Z [ x ] \mathbb{Z}[x] , so must be x n + 1 x^n+1 .


Conclusion: The only unfriendly numbers are powers of 2 2 . There are 10 \boxed{10} unfriendly numbers in the given range, which is our answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...