This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A163463 a(1)=1. For n >= 2: If a(n-1) is coprime to n, then a(n) = the smallest integer > a(n-1) that is coprime to n. If a(n-1) is not coprime to n, then a(n) = the smallest integer > a(n-1) that is not coprime to n. 1
 1, 3, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 19, 23, 26, 28, 29, 31, 32, 34, 37, 39, 40, 42, 43, 45, 48, 49, 50, 51, 52, 54, 55, 57, 58, 60, 61, 63, 65, 66, 67, 71, 72, 74, 76, 78, 79, 83, 85, 86, 88, 90, 91, 95, 99, 101, 103, 105, 106, 108, 109, 111, 112, 114, 116, 117, 118 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS G. C. Greubel, Table of n, a(n) for n = 1..1000 MATHEMATICA a = {1}; Do[If[GCD[n, a[[ -1]]] == 1, k = a[[ -1]] + 1; While[GCD[k, n] > 1, k++ ]; AppendTo[a, k], k = a[[ -1]] + 1; While[GCD[k, n] < 2, k++ ]; AppendTo[a, k]], {n, 2, 100}]; a (* Stefan Steinerberger, Aug 05 2009 *) PROG (PARI) al(n)=local(v, q); v=vector(n); v[1]=1; for(k=2, n, q=gcd(k, v[k-1])!=1; v[k]=v[k-1]+1; while(gcd(k, v[k])!=1!=q, v[k]++)); v \\ Franklin T. Adams-Watters, Aug 06 2009 CROSSREFS Sequence in context: A023993 A133159 A188544 * A137386 A153307 A265227 Adjacent sequences:  A163460 A163461 A163462 * A163464 A163465 A163466 KEYWORD nonn AUTHOR Leroy Quet, Jul 28 2009 EXTENSIONS More terms from Stefan Steinerberger and Franklin T. Adams-Watters, Aug 05 2009 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 23 16:10 EDT 2019. Contains 325258 sequences. (Running on oeis4.)