0%

Problem 601


Problem 601


Divisibility streaks

For every positive number n we define the function streak(n)=k as the smallest positive integer k such that n+k is not divisible by k+1.
E.g:
13 is divisible by 1
14 is divisible by 2
15 is divisible by 3
16 is divisible by 4
17 is NOT divisible by 5
So streak(13)=4.
Similarly:
120 is divisible by 1
121 is NOT divisible by 2
So streak(120)=1.

Define P(s,N) to be the number of integers n, 1<n<N, for which streak(n)=s.
So P(3,14)=1 and P(6,106)=14286.

Find the sum, as i ranges from 1 to 31, of P(i,4i).


连续整除

对于任意正整数n,我们定义函数streak(n)=k为使n+k不能被k+1整除的最小正整数k
例如:
13能被1整除
14能被2整除
15能被3整除
16能被4整除
17不能被5整除
因此streak(13)=4
类似地:
120能被1整除
121不能被2整除
因此streak(120)=1

定义P(s,N)1<n<N中满足streak(n)=s的整数n的数量。
因此P(3,14)=1,而P(6,106)=14286

i取值从1到31,求对应的P(i,4i)之和。


Gitalking ...