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!)
A137866 a(1)=0. For n >= 2, a(n) = gcd(a(n-1)+1, n). 1
0, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Starting with a(1) = 1 instead leads to a(n) = n for every positive integer n.
LINKS
MATHEMATICA
a[1] := 0; a[n_] := a[n] = GCD[a[n - 1] + 1, n]; Table[a[n], {n, 82}] (* Alonso del Arte, Feb 14 2011 *)
RecurrenceTable[{a[1]==0, a[n]==GCD[a[n-1]+1, n]}, a, {n, 90}] (* Harvey P. Dale, Aug 02 2016 *)
CROSSREFS
Sequence in context: A102096 A322813 A366189 * A361200 A329888 A352202
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 29 2008
EXTENSIONS
More terms from Sean A. Irvine, Feb 14 2011
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 March 29 09:59 EDT 2024. Contains 371268 sequences. (Running on oeis4.)