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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063985 Partial sums of cototient sequence A051953. 9
0, 1, 2, 4, 5, 9, 10, 14, 17, 23, 24, 32, 33, 41, 48, 56, 57, 69, 70, 82, 91, 103, 104, 120, 125, 139, 148, 164, 165, 187, 188, 204, 217, 235, 246, 270, 271, 291, 306, 330, 331, 361, 362, 386, 407, 431, 432, 464, 471, 501, 520, 548, 549, 585, 600, 632, 653, 683 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Number of elements in the set {(x,y): 1 <= x <= y <= n, 1 = gcd(x,y)}; a(n) = A000217(n) - A002088(n) = A100613(n) - A185670(n). - Reinhard Zumkeller, Jan 21 2013

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

FORMULA

a(n) = Sum_{x=1..n} (x - phi(x)) = Sum(x) - Sum(phi(x)) = A000217(n) - A002088(n), phi(n) = A000010(n), cototient(n) = A051953(n).

a(n) = n^2 - A091369(n). - Enrique Pérez Herrero, Feb 25 2012

G.f.: x/(1 - x)^3 - (1/(1 - x))*Sum_{k>=1} mu(k)*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Mar 18 2017

MATHEMATICA

f[n_] := n(n + 1)/2 - Sum[ EulerPhi@i, {i, n}]; Array[f, 58] (* Robert G. Wilson v *)

Accumulate[Table[n-EulerPhi[n], {n, 1, 60}]] (* Harvey P. Dale, Aug 19 2015 *)

PROG

(PARI) { a=0; for (n=1, 1000, write("b063985.txt", n, " ", a+=n - eulerphi(n)) ) } \\ Harry J. Smith, Sep 04 2009

(Haskell)

a063985 n = length [()| x <- [1..n], y <- [x..n], gcd x y > 1]

-- Reinhard Zumkeller, Jan 21 2013

(Python)

from sympy.ntheory import totient

def a(n): return sum([x - totient(x) for x in xrange(1, n + 1)])

print [a(n) for n in xrange(1, 101)] # Indranil Ghosh, Mar 18 2017

CROSSREFS

Cf. A000010, A000217, A002088, A048290, A051953.

Sequence in context: A089221 A167180 A091271 * A050052 A071349 A282737

Adjacent sequences:  A063982 A063983 A063984 * A063986 A063987 A063988

KEYWORD

nonn

AUTHOR

Labos Elemer, Sep 06 2001

EXTENSIONS

Corrected by Robert G. Wilson v, Dec 13 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 10:33 EDT 2018. Contains 316414 sequences. (Running on oeis4.)