0%

Problem 641


Problem 641


A Long Row of Dice

Consider a row of n dice all showing 1.

First turn every second die,(2,4,6,), so that the number showing is increased by 1. Then turn every third die. The sixth die will now show a 3. Then turn every fourth die and so on until every nth die (only the last die) is turned. If the die to be turned is showing a 6 then it is changed to show a 1.

Let f(n) be the number of dice that are showing a 1 when the process finishes. You are given f(100)=2 and f(108)=69.

Find f(1036).


一长排骰子

将共n个骰子排成一排,均翻至1点朝上。

从头开始,每数到第二个骰子(也即第2,4,6,个骰子),就将其翻动至点数加1。然后再从头开始,每数到第三个骰子,就将其翻动至点数加1;此时第六个骰子的点数应该是3点。如此循环,在最后一轮,每数到第n个骰子才将其翻动至点数加1(也就是说,只翻动最后一个骰子)。在每次翻动前,如果骰子当前是6点朝上,则翻动后变为1点朝上。

f(n)表示在全部翻动完毕后1点朝上的骰子数目。已知f(100)=2f(108)=69

f(1036)


Gitalking ...