Problem 943
Self Describing Sequences
Given two unequal positive integers $a$ and $b$, we define a self-describing sequence consisting of alternating runs of $a$s and $b$s. The first element is $a$ and the sequence of run lengths is the original sequence.
For $a=2, b=3$, the sequence is:
$$2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3,\ldots$$
The sequence begins with two $2$s and two $3$s, then three $2$s and three $3$s, so the run lengths $2, 2, 3, 3, \ldots$ are given by the original sequence.
Let $T(a, b, N)$ be the sum of the first $N$ elements of the sequence. You are given $T(2,3,10) = 25$, $T(4,2,10^4) = 30004$, $T(5,8,10^6) = 6499871$.
Find $\sum T(a, b, 22332223332233)$ for $2 \le a \le 223$, $2 \le b \le 223$ and $a \neq b$. Give your answer modulo $2233222333$.
自描述数列
给定两个不相等的正整数$a$和$b$,定义由$a$和$b$交替组成的自描述数列如下:该数列的第一个元素是$a$,且描述每一段相同整数数目的数列就是原数列本身。
对于$a=2, b=3$,该数列为:
$$2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3,\ldots$$
该数列以两个$2$和两个$3$开始,然后是三个$2$和三个$3$,因此描述每一段相同整数数目的数列$2, 2, 3, 3, \ldots$恰好就是原数列。
记$T(a, b, N)$为该数列前$N$个元素的和。已知$T(2,3,10) = 25$,$T(4,2,10^4) = 30004$,$T(5,8,10^6) = 6499871$。
对于所有$2 \le a \le 223$、$2 \le b \le 223$且$a \neq b$,求$\sum T(a, b, 22332223332233)$,并对$2233222333$取余作为你的答案。