0%

Problem 603


Problem 603


Substring sums of prime concatenations

Let S(n) be the sum of all contiguous integer-substrings that can be formed from the integer n. The substrings need not be distinct.

For example, S(2024)=2+0+2+4+20+02+24+202+024+2024=2304.

Let P(n) be the integer formed by concatenating the first n primes together. For example, P(7)=2357111317.

Let C(n,k) be the integer formed by concatenating k copies of P(n) together. For example, C(7,3)=235711131723571113172357111317.

Evaluate S(C(106,1012)) mod (109+7).


素数拼接的子串和

S(n)为整数n所能组成的全部连续整数子串的和。从不同位置和顺序得到的相同子串被视为不同的。

例如,S(2024)=2+0+2+4+20+02+24+202+024+2024=2304

P(n)为将前n个素数拼接成的整数。例如,P(7)=2357111317

C(n,k)为将kP(n)拼接成的整数。例如,C(7,3)=235711131723571113172357111317

试计算S(C(106,1012)) mod (109+7)


Gitalking ...