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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A116477 a(n) = sum{1<=k<=n, GCD(k,n)=1} floor(n/k). 3
1, 2, 4, 5, 9, 7, 15, 12, 18, 15, 28, 16, 36, 23, 31, 30, 51, 26, 59, 34, 50, 43, 75, 37, 77, 52, 72, 55, 102, 42, 112, 69, 90, 73, 106, 61, 141, 84, 109, 80, 159, 66, 169, 97, 119, 108, 187, 84, 185, 103, 155, 121, 218, 97, 193, 126, 179, 142, 248, 95, 262, 152, 185 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

sum{k|n} a(k) = sum{k=1 to n} d(k), where d(k) is the number of positive divisors of k.

Equals A054525 * A006218 (Mobius transform of A006218). [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Aug 07 2008]

FORMULA

a(n) also is sum{k|n} mu(n/k) (sum{j=1 to k} d(j)) and is sum{1<=k<=n} phi(n,n/k), where mu() is the Mobius (Moebius) function, d(j) is the number of positive divisors of j and phi(n,x) is the number of positive integers which are <= x and are coprime to n.

EXAMPLE

a(6)=7 because the numbers relatively prime to 6 and not exceeding 6 are 1 and 5, yielding floor(6/1)+floor(6/5)=7.

MAPLE

a:=proc(n) local s, j: s:=0: for j from 1 to n do if gcd(j, n)=1 then s:=s+floor(n/j) else s:=s: fi od: s: end: seq(a(n), n=1..75);

MATHEMATICA

Table[a := Select[Range[n], GCD[n, # ] == 1 &]; Sum[Floor[n/a[[i]]], {i, 1, Length[a]}], {n, 1, 60}]

PROG

(PARI) A116477(n) = sum(k=1, n, (gcd(k, n)==1)*floor(n/k)) [From Michael B. Porter (michael_b_porter(AT)yahoo.com), Mar 01 2010]

CROSSREFS

Cf. A006218. Row sums of A122191.

A054525 [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Aug 07 2008]

Sequence in context: A011175 A109534 A011341 * A116920 A116919 A167511

Adjacent sequences:  A116474 A116475 A116476 * A116478 A116479 A116480

KEYWORD

easy,nonn

AUTHOR

Leroy Quet Mar 18 2006

EXTENSIONS

More terms from Emeric Deutsch (deutsch(AT)duke.poly.edu) and Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Apr 01 2006

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 16 15:27 EST 2012. Contains 205930 sequences.