0%

Problem 795


Problem 795


Alternating GCD Sum

For 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+41+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+41+4=6

已知g(1234)=1233

G(N)=n=1Ng(n)。已知G(1234)=2194708

G(12345678)


Gitalking ...