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!)
A068773 Alternating sum phi(1) - phi(2) + phi(3) - phi(4) + ... + ((-1)^(n+1))*phi(n). 15
1, 0, 2, 0, 4, 2, 8, 4, 10, 6, 16, 12, 24, 18, 26, 18, 34, 28, 46, 38, 50, 40, 62, 54, 74, 62, 80, 68, 96, 88, 118, 102, 122, 106, 130, 118, 154, 136, 160, 144, 184, 172, 214, 194, 218, 196, 242, 226, 268, 248, 280, 256, 308, 290, 330, 306, 342, 314, 372, 356 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
László Tóth, Alternating Sums Concerning Multiplicative Arithmetic Functions, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
FORMULA
a(n) = Sum_{k=1..n} (-1)^(k+1)*phi(k).
a(n) = n^2/Pi^2 + O(n * log(n)^(2/3) * log(log(n))^(4/3)) (Tóth, 2017). - Amiram Eldar, Oct 14 2022
a(n) = 3*A002088(n) - 2*A049690(n). - Ridouane Oudra, Mar 22 2024
EXAMPLE
a(3) = phi(1) - phi(2) + phi(3) = 1 - 1 + 2 = 2.
MAPLE
with(numtheory): seq(add((-1)^(k+1)*phi(k), k=1..n), n=1..80); # Ridouane Oudra, Mar 22 2024
MATHEMATICA
Accumulate[Array[(-1)^(# + 1) * EulerPhi[#] &, 100]] (* Amiram Eldar, Oct 14 2022 *)
PROG
(PARI) a068773(m)=local(s, n); s=0; for(n=1, m, if(n%2==0, s=s-eulerphi(n), s=s+eulerphi(n)); print1(s, ", "))
CROSSREFS
Sequence in context: A284010 A278082 A327442 * A340692 A234312 A244136
KEYWORD
easy,nonn
AUTHOR
Klaus Brockhaus, Feb 28 2002
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 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)