cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 16 2009

Keywords

Comments

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

Examples

			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.
		

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

Programs

  • 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

Extensions

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