The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A124385 For all n >= 2, Sum_{2<=k<=n, gcd(k,n)>1} a(k) = 1. a(1)=1. 1
 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -3, 1, 1, 1, 1, 1, -3, -1, 3, 5, -1, 1, -7, 1, 9, 5, -1, 5, -13, 1, 13, 11, -5, 1, -25, 1, 25, 29, 5, 1, -53, 19, 19, 53, 23, 1, -95, -73, 81, 81, 25, 1, -119, 1, 119, 27, 1, 113, -143, 1, 89, 243, -69, 1, -335, 1, 457, 351, -81, 145, -841, 1, 497, 831, 425, 1, -1809, -883, 1809 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,18 LINKS EXAMPLE The positive integers which are <= 12 and are not coprime to 12 are 2,3,4,6,8,9,10,12. And a(12) is such that a(2)+a(3)+a(4)+a(6)+a(8)+a(9)+a(10)+a(12) = 1. MATHEMATICA f[n_] := Select[Range[2, n], GCD[ #, n] > 1 &]; g[l_] :=Append[l, 1 - Plus @@ l[[Most[f[Length[l] + 1]]]]]; Nest[g, {1}, 85] (* Ray Chandler, Nov 13 2006 *) CROSSREFS Cf. A124386. Sequence in context: A336850 A061680 A097558 * A317624 A328575 A106478 Adjacent sequences:  A124382 A124383 A124384 * A124386 A124387 A124388 KEYWORD sign AUTHOR Leroy Quet, Oct 29 2006 EXTENSIONS Extended by Ray Chandler, Nov 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 24 07:26 EDT 2021. Contains 345416 sequences. (Running on oeis4.)