

A161678


Sum of c mod k for k from (smallest prime factor of c) to (largest prime factor of c) where c is composite(n).


0



0, 0, 0, 0, 3, 0, 10, 3, 0, 0, 2, 5, 22, 0, 0, 34, 0, 8, 2, 0, 22, 61, 5, 0, 77, 42, 1, 4, 26, 1, 105, 0, 0, 4, 59, 35, 0, 20, 5, 65, 172, 0, 207, 9, 0, 30, 17, 66, 123, 7, 0, 290, 3, 82, 17, 33, 2, 0, 343, 4, 48, 384, 197, 27, 2, 15, 99, 201, 470, 94, 0, 9, 23, 1, 61, 36, 4, 573, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,5


COMMENTS

"composite(n)" stands for "nth composite number", so composite(1) to composite(8) are 4, 6, 8, 9, 10, 12, 14, 15.


LINKS



EXAMPLE

composite(2) = 6; (smallest prime factor of 6) = 2, (largest prime factor of 6) = 3. Hence a(2) = (6 mod 2)+(6 mod 3) = 0+0 = 0.
composite(5) = 10; (smallest prime factor of 10) = 2, (largest prime factor of 10) = 5. Hence a(5) = (10 mod 2)+(10 mod 3)+(10 mod 4)+(10 mod 5) = 0+1+2+0 = 3.
composite(7) = 14; (smallest prime factor of 14) = 2, (largest prime factor of 14) = 7. Hence a(7) = (14 mod 2)+(14 mod 3)+(14 mod 4)+(14 mod 5)+(14 mod 6)+(14 mod 7) = 0+2+2+4+2+0 = 10.


PROG

(Magma) [ &+[ n mod k: k in [D[1]..D[ #D]] where D is PrimeDivisors(n) ]: n in [4..110]  not IsPrime(n) ]; // Klaus Brockhaus, Jun 24 2009


CROSSREFS

Cf. A002808 (composite numbers), A004125 (sum of n mod k for k=1..n), A161517 (sum of c mod k for k=1..c where c is composite(n)).


KEYWORD

nonn


AUTHOR



EXTENSIONS

Edited, corrected (a(22)=63 replaced by 61, a(25)=78 replaced by 77) and extended by Klaus Brockhaus, Jun 24 2009


STATUS

approved



