login
a(n) = n - omega(n) + n * Sum_{p|n} 1/p.
1

%I #13 Oct 10 2021 23:21:04

%S 1,2,3,5,5,9,7,11,11,15,11,20,13,21,21,23,17,31,19,32,29,33,23,42,29,

%T 39,35,44,29,58,31,47,45,51,45,64,37,57,53,66,41,80,43,68,67,69,47,86,

%U 55,83,69,80,53,97,69,90,77,87,59,119,61,93,91,95,81,124,67,104,93,126

%N a(n) = n - omega(n) + n * Sum_{p|n} 1/p.

%C For 1 <= k <= n, if k is a prime divisor of n then add n/k, otherwise add 1. For example, a(6) = 9 since the values of k from 1 to 6 would be: 1 + 6/2 + 6/3 + 1 + 1 + 1 = 9.

%C If p is prime, then a(p) = p since we have a(p) = p - omega(p) + phi(1)*omega(p/1) + phi(p)*omega(p/p) = p - 1 + 1*1 + (p-1)*0 = p.

%F a(n) = Sum_{k=1..n} (n/k)^(c(k) * (1 - ceiling(n/k) + floor(n/k)), where c is the prime characteristic (A010051).

%F a(n) = n - A001221(n) + A069359(n).

%F a(prime(n)) = prime(n).

%t Table[n - PrimeNu[n] + Sum[EulerPhi[k]*PrimeNu[n/k] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 80}]

%Y Cf. A000010 (phi), A001221 (omega), A010051, A069359.

%K nonn

%O 1,2

%A _Wesley Ivan Hurt_, Oct 06 2021