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!)
A304576 a(n) = Sum_{k < n, k squarefree and relatively prime to n} (-1)^(k-1). 3
1, 1, 0, 2, 1, 2, 1, 4, 2, 3, 1, 4, 2, 5, 2, 7, 3, 6, 4, 7, 4, 9, 5, 8, 5, 10, 3, 9, 5, 8, 5, 13, 5, 13, 5, 11, 7, 15, 5, 14, 8, 11, 8, 17, 6, 18, 8, 15, 8, 17, 7, 19, 10, 16, 9, 20, 9, 23, 12, 15, 13, 25, 8, 26, 10, 18, 13, 26, 11, 22, 14, 22, 15, 30, 9, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
MATHEMATICA
l[n_]:=Sum[(-1)^(k-1), {k, Select[Range[n], And[SquareFreeQ[#], GCD[n, #]==1]&]}];
Table[l[n], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n, if (issquarefree(k) && (gcd(n, k)==1), (-1)^(k-1))); \\ Michel Marcus, May 15 2018
CROSSREFS
Sequence in context: A070972 A180229 A356230 * A353645 A249029 A075997
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 14 2018
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 May 9 17:14 EDT 2024. Contains 372354 sequences. (Running on oeis4.)