a) Notice that if k is a positive integer such that gcd(k,n)=1 and k<n then n−k and n are relatively prime. It follows that
k≤n,gcd(k,n)=1∑k=k≤n,gcd(k,n)=1∑(n−k)
Let A={k∈N∣1≤k≤n,gcd(k,n)=1={k1,k2,…,kn}} then
i=1∑φ(n)ki=21i=1∑φ(n)ki+21i=1∑φ(n)(n−ki)=21i=1∑φ(n)(ki+n−ki)=2nφ(n)
So, we have
s(n)=i=1∑ni−i=1∑φ(n)ki=2n(n+1)−2nφ(n)=2n(n+1−φ(n)).
b) Suppose that there exists a positive integer n such that s(n)=s(n+2021). Thus,
2s(n)=n(n+1−φ(n))=(n+2021)(n+2022−φ(n+2021))(∗)
or
2021(2n+2022−φ(n+2021))=n(φ(n+2021)−φ(n))(1)
From (*), it follows that n,n+2021 are divisors of 2s(n). Otherwise,
2s(n)=n(n+1)−nφ(n)<n(n+1)<n(n+2021),
so n,n+2021 are not coprime, which means (n,2021)=1. Let d=gcd(n,2021)>1, so gcd(dn,d2021)=1. From (1), we get
d2021(2n+2022−φ(n+2021))=dn(φ(n+2021)−φ(n))(2)
so there exists some positive integer x such that
φ(n+2021)−φ(n)=d2021⋅x(3)
2n+2022−φ(n+2021)=dn⋅x(4)
Thus, φ(n+2021)−φ(n) is divisible by 2021/d. Otherwise, one can check that φ(n+2021),φ(n) is divisible by φ(d) and gcd(φ(d),2021/d)=1 for all d∈{43,47,2021}, so
φ(n+2021)−φ(n):d2021φ(d)
On the other hand, it follows from (3) and (4)
d<x=d⋅n+20212n+2022−φ(n)<2d
It implies that, for all d∈{43,47,2021}
d2021φ(d)<d2021⋅d<d2021⋅x<2⋅2021<d3⋅2021φ(d)
Thus, φ(n+2021)−φ(n)=2⋅2021φ(d)/d and x=2φ(d), so
φ(n+2021)=d2n(d−φ(d))+2022(5)
φ(n)=d2n(d−φ(d))+2022−d2⋅2021φ(d)(6)
If n has at most 10 distinct prime divisors then
φ(n)>ni=2∏11(1−i1)=11n>d2n(d−φ(d)),d∈{43,47,2021},
which contradicts (6). We get n has at least 11 distinct prime divisors, so n>12! and φ(n) is divisible by 210.
Similarly, if n+2021 has at most 4 distinct prime divisors then
φ(n+2021)>(n+2021)i=2∏5(1−i1)=5n+2021.
Otherwise, n>12! and
5n+2021>d2n(d−φ(d))+2022,d∈{43,47,2021},
which contradicts (5). We get n+2021 has at least 5 distinct prime divisors, so φ(n+2021) is divisible by 24.
On the other hand
v2(φ(n+2021)−φ(n))=v2(d2⋅2021φ(d))≤3,∀d∈{43,47,2021}
which contradicts φ(n+2021):24 and φ(n):211. Hence, there does not exist a positive integer n such that s(n)=s(n+2021) □