login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A082666
a(1) = 0, for n > 1 if n = prime(k), then a(n) = k, otherwise a(n) = Sum_{d|n, d<n} a(d).
0
0, 1, 2, 1, 3, 3, 4, 2, 2, 4, 5, 7, 6, 5, 5, 4, 7, 8, 8, 9, 6, 6, 9, 16, 3, 7, 4, 11, 10, 18, 11, 8, 7, 8, 7, 24, 12, 9, 8, 20, 13, 21, 14, 13, 12, 10, 15, 36, 4, 11, 9, 15, 16, 20, 8, 24, 10, 11, 17, 53, 18, 12, 14, 16, 9, 24, 19, 17, 11, 24, 20, 66, 21, 13, 13
OFFSET
1,3
FORMULA
a(1) = 0, a(n) = A049084(n) + Sum_{d|n, d<n} a(d) for n > 1.
EXAMPLE
a(20) = a(1) + a(2) + a(4) + a(5) + a(10) = 0 + 1 + (a(1)+a(2)) + 3 + (a(1)+a(2)+a(5)) = 0 + 1 + (0+1) + 3 + (0+1+3) = 1 + 1 + 3 + 4 = 9.
PROG
(PARI) lista(nn) = {my(v=vector(nn)); for(n=2, nn, v[n]=if(isprime(n), primepi(n), sumdiv(n, d, v[d]))); v; } \\ Jinyuan Wang, Apr 07 2020
CROSSREFS
Cf. A049084.
Sequence in context: A263275 A308057 A097686 * A363619 A363625 A057938
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 18 2003
EXTENSIONS
a(36)-a(37) merged into a(36) by Jinyuan Wang, Apr 07 2020
STATUS
approved