Freshmark
← Back to all writing

Mathematics

Bounded Monotone Sequence Transformations Eventually Repeat

(2024·Xuzhou Simulation) For the sequence P:a1,a2,⋯ ,anP:a_1,a_2,\cdots,a_n where each item is a positive integer, define transformations T1T_1 and T1T_1 to transform the s

(2024·Xuzhou Simulation) For the sequence P:a1,a2,⋯ ,anP:a_1,a_2,\cdots,a_n where each item is a positive integer, define transformations T1T_1 and T1T_1 to transform the sequence PP into the sequence T1(P):n,a1−1,a2−1,⋯ ,an−1T_1(P):n,a_1-1,a_2-1,\cdots,a_n-1. For the sequence Q:b1,b2,⋯ ,bmQ:b_1,b_2,\cdots,b_m in which each item is a non-negative integer, define S(Q)=2(b1+2b2+⋯+mbm)+b12+b22+⋯+bm2S(Q)=2(b_1+2b_2+\cdots+mb_m)+b_1^2+b_2^2+\cdots+b_m^2, define transformations T2T_2, T2T_2 Arrange the items in the sequence QQ from large to small**, and then remove all zero items to obtain the sequence T2(Q)T_2(Q).

(1) If the sequence P0P_0 is 2,4,3,72,4,3,7, find the value of S(T1(P0))S(T_1(P_0)).

(2) For the finite sequence P0P_0 where each item is a positive integer, let Pk+1=T2(T1(Pk))P_{k+1}=T_2(T_1(P_k)), k∈Nk\in\mathbb{N}.

(i) Explore the relationship between S(T1(P0))S(T_1(P_0)) and S(P0)S(P_0);

(ii) Proof: S(Pk+1)≤S(Pk)S(P_{k+1})\leq S(P_k).

(1) T1(P0):4,1,3,2,6T_1(P_0):4,1,3,2,6, S(T1(P0))=2(1×4+2×1+3×3+4×2+5×6)+42+12+32+22+62=2×53+66=172S(T_1(P_0))=2(1\times 4+2\times 1+3\times 3+4\times 2+5\times 6)+4^2+1^2+3^2+2^2+6^2=2\times 53+66=172

(2)(i)

S(T1(P0))=2[n+2(a1−1)+3(a2−1)+...+(n+1)(an−1)]+n2+∑i=1n(ai−1)2=2[n−n(n+3)2]+n2+n+2(a1+2a2+...+nan)+2(a1+a2+...+an)+∑i=1nai2−2(a1+a2+...+an)=2(a1+a2+...+an)+∑i=1nai2=S(P0)\begin{gathered} S(T_1(P_0))\\=2[n+2(a_1-1)+3(a_2-1)+...+(n+1)(a_n-1)]+n^2+\sum_{i=1}^n(a_i-1)^2 \\=2[n-\frac{n(n+3)}{2}]+n^2+n+2(a_1+2a_2+...+na_n)+2(a_1+a_2+...+a_n)+\sum_{i=1}^na_i^2-2(a_1+a_2+...+a_n) \\=2(a_1+a_2+...+a_n)+\sum_{i=1}^na_i^2 \\=S(P_0) \end{gathered}

(ii)

From (i) we know: S(T1(P0))=S(P0)S(T_1(P_0))=S(P_0), only T2T_2 causes SS to become smaller:

Proof below: S(T2(A))<S(A)S(T_2(A))\lt S(A).

The T2T_2 operation** will not change the size of the sum of squares**, but putting the large number in the front will have a smaller coefficient; putting the small number in the back will have a larger coefficient, which is equivalent to a smaller reverse sum.

[!TIP] Pay attention to the operation sequence of T2T_2 Arrange the terms in the sequence QQ from large to small**, and then remove all zero terms

Although the final results of Remove zeros first and Sort first are the same, this order can assist us in the writing process.

Reference answer
Reference answer

The answer is relatively normal, which is equivalent to proving the sorting inequality

Why is it more difficult to write remove zeros first? Because if remove zeros first, if there are 0s in the middle, then the value of SS may be adapted. And sort first makes 0s at the end, and removing zeros does not affect SS.

Another solution: completing the square makes (i) and (ii) one line each (added by Claude)

This section was added by Claude, an AI model made by Anthropic, after the author's solution. It is not written by the original author.

For any sequence of non-negative integers Q:b1,…,bmQ:b_1,\dots,b_m, since 2kbk+bk2=(bk+k)2−k22kb_k+b_k^2=(b_k+k)^2-k^2,

S(Q)=∑k=1m(bk+k)2−∑k=1mk2.S(Q)=\sum_{k=1}^{m}(b_k+k)^2-\sum_{k=1}^{m}k^2 .

(i) The first term of T1(P)T_1(P) is nn and term k+1k+1 is ak−1a_k-1, contributing (n+1)2(n+1)^2 and (ak−1+k+1)2=(ak+k)2(a_k-1+k+1)^2=(a_k+k)^2:

S(T1(P))=(n+1)2+∑k=1n(ak+k)2−∑k=1n+1k2=∑k=1n(ak+k)2−∑k=1nk2=S(P).S(T_1(P))=(n+1)^2+\sum_{k=1}^{n}(a_k+k)^2-\sum_{k=1}^{n+1}k^2=\sum_{k=1}^{n}(a_k+k)^2-\sum_{k=1}^{n}k^2=S(P).

(ii) S(Q)=∑bk2+2∑kbkS(Q)=\sum b_k^2+2\sum kb_k. Sorting leaves ∑bk2\sum b_k^2 unchanged, and by the rearrangement inequality ∑kbk\sum kb_k is smallest in decreasing order. The zeros then sit at the end, where each contributes (0+k)2−k2=0(0+k)^2-k^2=0, so removing them does not change SS. Hence S(T2(Q))≤S(Q)S(T_2(Q))\le S(Q), and with (i), S(Pk+1)≤S(Pk)S(P_{k+1})\le S(P_k).

Finally, I’ll add one more question, taken from the 2026 Beijing No. 2 Middle School Grade 2 (Part 2) Grade 4 exam:

(III) Prove that for any finite sequence A0A_0 whose terms are positive integers, there exists a positive integer KK such that when k≥K, S(Ak+1)=S(Ak)\text{when }k\ge K,\ S(A_{k+1})=S(A_k).

[!TIP] Consider the boundedness, monotonicity and discreteness of S

(21) (2025 Daxing) (15 points for this question)

For a positive integer nn, define T(n)T(n) as the sum of the squares of each digit of nn. It is known that the infinite sequence {an}\{a_n\} satisfies: a1a_1 is a positive integer, and for any n∈N∗n \in \mathbb{N}^*, an+1=T(an)a_{n+1} = T(a_n).

(I) If a1=2a_1 = 2, find the value of a2,a3,a4,a5a_2,a_3,a_4,a_5;

(II) If a1a_1 is a three-digit number, is there a1a_1 such that a1,a2,a3a_1,a_2,a_3 is incremented? If it exists, find all the values of a1a_1 that meet the conditions; if it does not exist, explain the reason;

(III) Prove: For any positive integer a1a_1, there are always positive integers KK and TT, such that for any n>Kn > K, an+r=ana_{n+r} = a_n.

Reference answer to part III
Reference answer to part III

(III) of the two questions are exactly the same, both making use of discreteness and boundedness, leaving it to the readers to think for themselves.

Solutions to both parts (III) (added by Claude)

This section was added by Claude, an AI model made by Anthropic, after the author's solution. It is not written by the original author.

Xuzhou problem (III). By (ii), S(A0)≥S(A1)≥S(A2)≥⋯S(A_0)\ge S(A_1)\ge S(A_2)\ge\cdots, and every S(Ak)S(A_k) is a non-negative integer. A non-increasing sequence of non-negative integers can only drop finitely many times (the total drop is at most S(A0)S(A_0)), so there is a KK with S(Ak+1)=S(Ak)S(A_{k+1})=S(A_k) for all k≥Kk\ge K.

Daxing problem (III). If nn has d≥4d\ge4 digits, then T(n)≤81d<10d−1≤nT(n)\le81d<10^{d-1}\le n; if n≤999n\le999, then T(n)≤3×81=243T(n)\le3\times81=243. So once the sequence is below 10001000 it stays there, and until then every step strictly decreases it, so it enters {1,2,…,999}\{1,2,\dots,999\} after finitely many steps. In that finite set the pigeonhole principle gives p<qp<q with ap=aqa_p=a_q, and since an+1a_{n+1} depends only on ana_n, the sequence repeats with period q−pq-p from apa_p on. Take K=pK=p and period q−pq-p.

Comments

Comments

Sign in to join the discussion. Email is verified only when you register.

Loading comments…

Checking your session…