A positive integer n is called friendly if there exist two positive integers j and k such that:
j + k = n
There exist two sequences { a i } i = 0 ∞ and { b i } i = 0 ∞ of integers (not necessarily positive) satisfying the following conditions. ⎩ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎧ a i = 0 b i = 0 i = 0 ∑ v a i b v − i = 0 a 0 b 0 = a j b k = 1 for all i > j for all i > k for all v ∈ { 1 , 2 , ⋯ , n − 1 }
Find the number of positive integers ≤ 1 0 0 0 which are not friendly.
Details and assumptions
As an explicit example, when n = 3 and j = 1 , k = 2 , the last condition reads: ⎩ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎧ a i = 0 b i = 0 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 for all i > 1 for all i > 2 It isn't hard to verify that the sequences { a 0 , a 1 , a 2 , a 3 , ⋯ } = { 1 , 1 , 0 , 0 , ⋯ } and { b 0 , b 1 , b 2 , b 3 , ⋯ } = { 1 , − 1 , 1 , 0 , 0 , ⋯ } satisfy all the conditions above, so 3 is a friendly number.
By definition, 1 and 2 are unfriendly numbers.
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.
Problem Loading...
Note Loading...
Set Loading...
Let f ( x ) = v = 0 ∑ ∞ a v x v and g ( x ) = v = 0 ∑ ∞ b v x v . Since a v = 0 for all v > j and b v = 0 for all v > k , it follows that f ( x ) = v = 0 ∑ j a v x v and g ( x ) = 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 ) . The constant term of h ( x ) is a 0 b 0 = 1 , and its leading coefficient (coefficient of x j + k = x n ) is a j b k = 1 . Note that for all 1 ≤ v ≤ n − 1 , the coefficient of x v in h ( x ) is m = 0 ∑ v a j b m − v = 0 . Thus, h ( x ) = x n + 1 . We thus conclude such a sequence exists if and only if the polynomial h n ( x ) = x n + 1 is reducible over Z [ x ] .
Let n = 2 m ⋅ N , where N is an odd integer. If 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 ) , which is reducible over Z [ x ] . If N = 1 , n = 2 m for some m ∈ N and h n ( x ) = x n + 1 = x n − 1 x 2 n − 1 = d ∣ n ∏ Φ d ( x ) d ∣ 2 n ∏ Φ d ( x ) , where Φ d ( x ) denotes the d th cyclotomic polynomial. Note that the only divisor of 2 n = 2 m + 1 which doesn't divide n = 2 m is 2 n itself. Thus, all but one of the terms cancel out, leaving us with x n + 1 = Φ 2 n ( x ) . Since every cyclotomic polynomial is irreducible over Z [ x ] , so must be x n + 1 .
Conclusion: The only unfriendly numbers are powers of 2 . There are 1 0 unfriendly numbers in the given range, which is our answer.