login
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

%I #8 Sep 08 2022 08:45:45

%S 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,

%T 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,

%U 33,2,0,343,4,48,384,197,27,2,15,99,201,470,94,0,9,23,1,61,36,4,573,0

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

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

%e 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.

%e 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.

%e 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.

%o (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

%Y 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)).

%K nonn

%O 1,5

%A _Juri-Stepan Gerasimov_, Jun 16 2009

%E Edited, corrected (a(22)=63 replaced by 61, a(25)=78 replaced by 77) and extended by _Klaus Brockhaus_, Jun 24 2009