PE362

Squarefree Factors

对于 54 54 54,考虑他的因数分解,如果因子必须是squarefree number,则只有两种方法:
54 = 3 ∗ 3 ∗ 6 = 2 ∗ 3 ∗ 3 ∗ 3 \begin{aligned} 54 &= 3*3*6\\ &= 2*3*3*3 \end{aligned} 54=336=2333
我们记作 F s t ( 54 ) = 2 Fst(54)=2 Fst(54)=2
我们定义 S ( n ) = ∑ k = 2 n F s t ( k ) S(n)=\sum_{k=2}^{n}{Fst(k)} S(n)=k=2nFst(k)
求 S ( 1 0 10 ) 求S(10^{10}) S(1010)

思路

我们不考虑计算某一个数的 F s t Fst Fst的值,而是直接计算 S S S的值
我们定义 F ( N , s t a r t ) F(N, start) F(N,start)为一个非递降一个序列,其中都是squarefree number,且第一项 ≥ \ge start且,序列的乘积 ≤ \le N的序列的总数.

形式化的表达如下:
考虑如下序列的个数为 F ( N , s t a r t ) F(N, start) F(N,start):
a 1 , a 2 , a 3 . . . a n a_1, a_2, a_3...a_n a1,a2,a3...an, 其中 a 1 ≥ a 2 ≥ a 3 . . . ≥ a n a_1 \ge a_2 \ge a_3... \ge a_n a1a2a3...an a 1 ⋅ a 2 ⋅ a 3 ⋅ ⋅ ⋅ ⋅ a n ≤ N a_1 \cdot a_2 \cdot a_3 \cdot\cdot\cdot\cdot a_n \le N a1a2a3anN

那么最终答案表达式为 F ( 1 0 10 , 2 ) F(10^{10}, 2) F(1010,2)

如何计算

考虑序列的长度为1和大于的情况

  • 如果序列长度为 1 1 1, 那么 F ( N , s t a r t ) = ∑ i = s t a r t N F(N, start) = \sum_{i=start}^{N} F(N,start)=i=startN, i i i是squarefree number
  • 如果序列长度大于 1 1 1,显然 a 1 ≤ N a_1 \le \sqrt{N} a1N . 考虑枚举 a 1 a_1 a1的值,注意 a 1 a_1 a1的是一个squarefree number
    F ( N , s t a r t ) = ∑ i = s t a r t N F ( N i , i ) F(N, start)=\sum_{i=start}^{\sqrt{N}}F(\frac{N}{i}, i) F(N,start)=i=startN F(iN,i)
    对于是一个squarefree number的 x x x,我们有 μ 2 ( x ) = 1 \mu^2(x)=1 μ2(x)=1,因此可以把式子写为
    F ( N , s t a r t ) = ∑ i = s t a r t N ⋅ μ 2 ( i ) + ∑ i = s t a r t N F ( N i , , i ) ⋅ μ 2 ( i ) F(N, start)=\sum_{i=start}^{N}\cdot\mu^2(i) + \sum_{i=start}^{\sqrt{N}}F(\frac{N}{i,}, i)\cdot\mu^2(i) F(N,start)=i=startNμ2(i)+i=startN F(i,N,i)μ2(i)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值