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!)
 A161888 a(n) = the smallest positive integer that does not divide n, and is such that sum{k=1 to n} a(k) is coprime to n. 2
 2, 3, 2, 6, 3, 7, 2, 6, 4, 4, 2, 8, 2, 4, 4, 6, 2, 4, 2, 6, 4, 4, 2, 14, 3, 3, 4, 8, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 4, 6, 2, 4, 2, 6, 6, 4, 2, 10, 2, 4, 2, 6, 2, 4, 3, 3, 4, 4, 2, 8, 2, 4, 4, 6, 3, 5, 2, 6, 2, 8, 2, 10, 2, 4, 4, 6, 3, 9, 2, 6, 4, 4, 2, 8, 3, 3, 4, 6, 2, 4, 2, 6, 4, 4, 3, 5, 2, 4, 2, 8, 2, 8, 2, 6, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Sum{k=1 to n} a(k) = A161889(n). LINKS Harvey P. Dale, Table of n, a(n) for n = 1..1000 MATHEMATICA spi[{n_, s_, a_}]:=Module[{k=1}, While[Divisible[n+1, k]||!CoprimeQ[s+k, n+1], k++]; {n+1, s+k, k}]; Transpose[NestList[spi, {1, 2, 2}, 105]][[3]] (* Harvey P. Dale, May 26 2015 *) CROSSREFS Cf. A161889 Sequence in context: A134060 A329282 A197289 * A157224 A097914 A286633 Adjacent sequences:  A161885 A161886 A161887 * A161889 A161890 A161891 KEYWORD nonn AUTHOR Leroy Quet, Jun 21 2009 EXTENSIONS More terms from Sean A. Irvine, Aug 10 2010 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 July 29 22:32 EDT 2021. Contains 346346 sequences. (Running on oeis4.)