login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072514 Sum of n mod k for k in {1...n} with gcd(k,n) > 1. 2
0, 0, 0, 0, 0, 2, 0, 2, 3, 8, 0, 9, 0, 16, 17, 16, 0, 27, 0, 31, 31, 44, 0, 52, 20, 56, 36, 69, 0, 92, 0, 72, 77, 102, 68, 127, 0, 128, 97, 152, 0, 192, 0, 165, 153, 196, 0, 230, 56, 231, 170, 237, 0, 319, 154, 290, 211, 302, 0, 421, 0, 334, 273, 334, 192, 478, 0, 411, 317 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
Previous name was: Sum of the remainders when n is divided by unrelated numbers (numbers which are neither coprime to n nor divide n).
LINKS
EXAMPLE
a(18) = 27: the unrelated numbers to 18 are 4, 8, 10, 12, 14, 15 and 16. The remainders when 18 is divided by these numbers are 2, 2, 8, 6, 4, 3 and 2 whose sum is 27.
MAPLE
seq(add(n mod k, k=select(j->gcd(j, n)>1, [$1..n])), n=1..69); # Peter Luschny, Oct 01 2014
MATHEMATICA
snmk[n_]:=Total[Mod[n, Complement[Complement[Range[n], Divisors[n]], Select[ Range[n], CoprimeQ[ #, n]&]]]]; Array[snmk, 70] (* Harvey P. Dale, Dec 09 2018 *)
PROG
(PARI) lista(nn) = vector(nn, n, sum(i=1, n, (n % i)*(gcd(n, i) != 1))); \\ Michel Marcus, Oct 01 2014
CROSSREFS
Sequence in context: A274568 A233399 A226432 * A071547 A220222 A089839
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 30 2002
EXTENSIONS
Corrected and extended by David Garber, Oct 22 2002
New name from Robert Israel, Oct 01 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:49 EDT 2024. Contains 371914 sequences. (Running on oeis4.)