[go: up one dir, main page]

login
A345888
a(n) = n + (n - 1) * pi(n).
1
1, 3, 7, 10, 17, 21, 31, 36, 41, 46, 61, 67, 85, 92, 99, 106, 129, 137, 163, 172, 181, 190, 221, 231, 241, 251, 261, 271, 309, 320, 361, 373, 385, 397, 409, 421, 469, 482, 495, 508, 561, 575, 631, 646, 661, 676, 737, 753, 769, 785, 801, 817, 885, 902, 919, 936, 953, 970
OFFSET
1,2
COMMENTS
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.
FORMULA
a(n) = Sum_{k=1..n} n^c(k), where c(n) is the prime characteristic (A010051).
MATHEMATICA
Table[n + (n - 1)*PrimePi[n], {n, 50}]
CROSSREFS
Cf. A000720 (pi), A010051, A345890.
Sequence in context: A333910 A307191 A234638 * A128223 A217258 A258864
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 28 2021
STATUS
approved