The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A345890 a(n) = n + (n - 1) * (n - pi(n)). 1
 1, 3, 5, 10, 13, 21, 25, 36, 49, 64, 71, 89, 97, 118, 141, 166, 177, 205, 217, 248, 281, 316, 331, 369, 409, 451, 495, 541, 561, 610, 631, 683, 737, 793, 851, 911, 937, 1000, 1065, 1132, 1161, 1231, 1261, 1334, 1409, 1486, 1519, 1599, 1681, 1765, 1851, 1939, 1977, 2068 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS For all 1 <= k <= n, add 1 if k is prime, otherwise add n. For example, when n = 7, there are 4 numbers less than or equal to 7 that are prime and 3 that are not. Then a(7) = 1*4 + 7*3 = 25. LINKS Table of n, a(n) for n=1..54. FORMULA a(n) = Sum_{k=1..n} n^c(n), where c(n) is the characteristic function of nonprimes (A005171). MATHEMATICA Table[n + (n - 1)*(n - PrimePi[n]), {n, 50}] CROSSREFS Cf. A000720 (pi), A005171, A345888. Sequence in context: A165718 A340528 A031878 * A265282 A160792 A308759 Adjacent sequences: A345887 A345888 A345889 * A345891 A345892 A345893 KEYWORD nonn AUTHOR Wesley Ivan Hurt, Jun 28 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 16 15:31 EDT 2024. Contains 375976 sequences. (Running on oeis4.)