#P9308. 「DTOI-5」#1f1e33

「DTOI-5」#1f1e33

题目背景

In the middle of night.

题目描述

定义函数 f(n)=i=1nj=1nk=1n[i+j+k=n]lcm(i,gcd(j,k))f(n) = \displaystyle\sum_{i = 1}^n \sum_{j = 1}^n \sum_{k = 1}^n [i + j + k = n] \operatorname{lcm}(i, \gcd(j, k))

给定 nn,对于所有 1in1 \leq i \leq n求出所有 f(i)mod998244353f(i) \bmod 998244353 的值。

输入格式

一行,一个整数 nn

输出格式

一行,nn 个整数,表示所有 f(i)mod998244353f(i) \bmod 998244353 的值。

输入数据 1

10

输出数据 1

0 0 1 4 11 20 42 60 100 134

提示

【数据范围】

测试点编号n=Points110010pts210310pts310420pts410520pts5/40pts\def\or{\operatorname{or}} %\def\arrayscretch{1.5} \def\arraystretch{1.5} \begin{array}{|c|c|c|}\hline \textbf{测试点编号}&n= &\textbf{Points}\cr\hline \sf1&100&10 \operatorname{pts}\cr\hline \sf2&10^3&10 \operatorname{pts}\cr\hline \sf3&10^4&20 \operatorname{pts}\cr\hline \sf4&10^5&20 \operatorname{pts}\cr\hline \sf5&/&40 \operatorname{pts}\cr\hline \end{array}

对于 100%100\% 的数据,1n1061 \leq n \leq 10^6