login
a(n) = n + (n - 1) * pi(n).
1

%I #5 Jun 28 2021 16:22:23

%S 1,3,7,10,17,21,31,36,41,46,61,67,85,92,99,106,129,137,163,172,181,

%T 190,221,231,241,251,261,271,309,320,361,373,385,397,409,421,469,482,

%U 495,508,561,575,631,646,661,676,737,753,769,785,801,817,885,902,919,936,953,970

%N a(n) = n + (n - 1) * pi(n).

%C For all 1 <= k <= n, add n if k is prime, otherwise add 1. For example, when n = 7, there are 4 primes less than or equal to 7 and 3 that are not. Then we have a(7) = 4*7 + 3 = 31.

%F a(n) = Sum_{k=1..n} n^c(k), where c(n) is the prime characteristic (A010051).

%t Table[n + (n - 1)*PrimePi[n], {n, 50}]

%Y Cf. A000720 (pi), A010051, A345890.

%K nonn

%O 1,2

%A _Wesley Ivan Hurt_, Jun 28 2021