Problem 795 题目发布于 2022-04-23 翻译更新于 2022-10-10 Problem 795 Alternating GCD SumFor a positive integer n, the function g(n) is defined as g(n)=∑i=1n(−1)igcd(n,i2) For example, g(4)=−gcd(4,12)+gcd(4,22)−gcd(4,32)+gcd(4,42)=−1+4−1+4=6.You are also given g(1234)=1233. Let G(N)=∑n=1Ng(n). You are given G(1234)=2194708. Find G(12345678). 交错最小公约数求和对于正整数n,定义函数g(n)为 g(n)=∑i=1n(−1)igcd(n,i2) 例如,g(4)=−gcd(4,12)+gcd(4,22)−gcd(4,32)+gcd(4,42)=−1+4−1+4=6。已知g(1234)=1233。 记G(N)=∑n=1Ng(n)。已知G(1234)=2194708。 求G(12345678)。
Gitalking ...