0%

Problem 175


Problem 175


Fractions involving the number of different ways a number can be expressed as a sum of powers of 2

Define f(0)=1 and f(n) to be the number of ways to write n as a sum of powers of 2 where no power occurs more than twice.

For example, f(10)=5 since there are five different ways to express 10:
10=8+2=8+1+1=4+4+2=4+2+2+1+1=4+4+1+1

It can be shown that for every fraction p/q(p>0,q>0) there exists at least one integer n such that f(n)/f(n1)=p/q.

For instance, the smallest n for which f(n)/f(n1)=13/17 is 241.

The binary expansion of 241 is 11110001.

Reading this binary number from the most significant bit to the least significant bit there are 4 one’s, 3 zeroes and 1 one. We shall call the string 4,3,1 the Shortened Binary Expansion of 241.

Find the Shortened Binary Expansion of the smallest n for which
f(n)/f(n1)=123456789/987654321.

Give your answer as comma separated integers, without any whitespaces.


与幂和表示有关的分数

f(0)=1f(n)为将n写成2的幂次的和且任意幂次出现不超过两次的方式数。

例如,f(10)=5,因为10恰好有5种不同的表示方式:
10=8+2=8+1+1=4+4+2=4+2+2+1+1=4+4+1+1

对于任意分数p/q(其中整数p>0,整数q>0),我们都能找到至少一个整数n,使得f(n)/f(n1)=p/q

例如,使得f(n)/f(n1)=13/17的最小的n241

241的二进制表示为11110001

从左往右读这个二进制串我们得到4130,再11。因此,我们称数字串4,3,1241简式二进制表示

找出满足下式的最小的n的简式二进制表示:
f(n)/f(n1)=123456789/987654321.

你的答案应当用半角逗号“,”隔开各个整数,且没有任何空格。


Gitalking ...