The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A128248 a(n) = Sum_{k=1..phi(n)} t(k,n)*(-1)^k, where t(k,n) is the k-th positive integer that is coprime to n and phi(n) = A000010(n). 1
-1, -1, 1, 2, 2, 4, 3, 4, 3, 4, 5, 8, 6, 8, 8, 8, 8, 12, 9, 8, 8, 12, 11, 16, 10, 12, 9, 16, 14, 16, 15, 16, 16, 16, 16, 24, 18, 20, 16, 16, 20, 16, 21, 24, 24, 24, 23, 32, 21, 20, 24, 24, 26, 36, 24, 32, 24, 28, 29, 32, 30, 32, 24, 32, 32, 32, 33, 32, 32, 32, 35, 48, 36, 36, 40, 40, 40, 32, 39, 32, 27, 40, 41, 32, 40, 44, 40, 48, 44, 48, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(1) and a(2) are the only negative terms of the sequence.
LINKS
EXAMPLE
The positive integers which are <= 10 and are coprime to 10 are 1,3,7,9. So a(10) = -1 + 3 - 7 + 9 = 4.
MAPLE
with(numtheory): t:=proc(k, n) local A, i: A:={}: for i from 1 while nops(A)<=k do if igcd(i, n)=1 then A:=A union {i} else A:=A: fi od: A[k] end: a:=n->add((-1)^k*t(k, n), k=1..phi(n)): seq(a(n), n=1..100); # Emeric Deutsch, May 06 2007
MATHEMATICA
Table[Total[Times@@@Partition[Riffle[Select[Range[n], CoprimeQ[#, n]&], {-1, 1}, {2, -1, 2}], 2]], {n, 100}] (* Harvey P. Dale, May 05 2013 *)
CROSSREFS
Sequence in context: A078317 A105016 A074747 * A347659 A224901 A366651
KEYWORD
sign
AUTHOR
Leroy Quet, May 03 2007
EXTENSIONS
More terms from Emeric Deutsch, May 06 2007
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 June 4 17:14 EDT 2024. Contains 373102 sequences. (Running on oeis4.)