login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006579 Sum of GCD(n,k) for k = 1 to n-1.
(Formerly M0941)
10
0, 1, 2, 4, 4, 9, 6, 12, 12, 17, 10, 28, 12, 25, 30, 32, 16, 45, 18, 52, 44, 41, 22, 76, 40, 49, 54, 76, 28, 105, 30, 80, 72, 65, 82, 132, 36, 73, 86, 140, 40, 153, 42, 124, 144, 89, 46, 192, 84, 145, 114, 148, 52, 189, 134, 204, 128, 113, 58, 300, 60, 121, 210, 192 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

REFERENCES

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n=1..2000

FORMULA

a(p) = p-1 for a prime p.

a(n) = A018804(n)-n = Sum_{ d divides n } (d-1)*phi(n/d). - Vladeta Jovovic (vladeta(AT)eunet.rs), May 04 2002

a(n+2)=sum{k=0..n, gcd(n-k+1, k+1)}=-sum{k=0..4n+2, gcd(4n-k+3, k+1)(-1)^k/4} - Paul Barry (pbarry(AT)wit.ie), May 03 2005

EXAMPLE

a(12) = GCD(12,1) + GCD(12,2) + ... GCD(12,11) = 1+2+3+4+1+6+1+4+3+2+1 = 28.

MATHEMATICA

f[n_] := Sum[ GCD[n, k], {k, 1, n - 1}]; Table[ f[n], {n, 1, 60}]

PROG

(PARI) A006579(n) = sum(k=1, n-1, gcd(n, k)) [From Michael B. Porter (michael_b_porter(AT)yahoo.com), Feb 23 2010]

CROSSREFS

Antidiagonal sums of array A003989.

Sequence in context: A096189 A010464 A187209 * A195727 A039887 A114215

Adjacent sequences:  A006576 A006577 A006578 * A006580 A006581 A006582

KEYWORD

nonn

AUTHOR

Marc LeBrun (mlb(AT)well.com)

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), May 04 2002

Corrected by Ron Lalonde (ronronronlalonde(AT)hotmail.com), Oct 24 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 17:13 EST 2012. Contains 205828 sequences.