P9781 [HUSTFC 2023] Approximate Increasing Sequences
Description
For an integer sequence $a_1,a_2,\cdots,a_m$ of length $m\ (m\ge 1)$ with $a_i>0$, if there exists **at most** one integer $p\ (1\le p
Input Format
One line contains an integer $n\ (1\le n\le 10^8)$, whose meaning is as described in the statement.
Output Format
Output one integer, representing $\sum_{i=1}^n f(i)$ modulo $998\,244\,353$.
Explanation/Hint
In sample 1, the $7$ approximate increasing sequences are: $\{1\}$, $\{1,1\}$, $\{1,1,2\}$, $\{1,2\}$, $\{1,2,1\}$, $\{2\}$, $\{2,1\}$.
Translated by ChatGPT 5