A346155 Partial sums of A007978.
2, 5, 7, 10, 12, 16, 18, 21, 23, 26, 28, 33, 35, 38, 40, 43, 45, 49, 51, 54, 56, 59, 61, 66, 68, 71, 73, 76, 78, 82, 84, 87, 89, 92, 94, 99, 101, 104, 106, 109, 111, 115, 117, 120, 122, 125, 127, 132, 134, 137, 139, 142, 144, 148, 150, 153, 155, 158, 160, 167
Offset: 1
Keywords
Examples
If b(n) is least non-divisor of n then, a(6) = b(1)+b(2)+b(3)+b(4)+b(5)+b(6) => 2+3+2+3+2+4 = 16.
Links
- Michel Marcus, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
lnd[n_] := Module[{k = 2}, While[Divisible[n, k], k++]; k]; Accumulate @ Array[lnd, 100] (* Amiram Eldar, Jul 11 2021 *)
-
PARI
f(n) = {my(k=2); while(!(n % k), k++); k; } \\ A007978 a(n) = sum(k=1, n, f(k)); \\ Michel Marcus, Jul 11 2021
Formula
a(n) ~ (1 + A064859) * n. - Amiram Eldar, Jul 11 2021