The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A124195 a(1)=1. a(n) = n - GCD(a(n-1),n). 1
1, 1, 2, 2, 4, 4, 6, 6, 6, 8, 10, 10, 12, 12, 12, 12, 16, 16, 18, 18, 18, 20, 22, 22, 24, 24, 24, 24, 28, 28, 30, 30, 30, 32, 34, 34, 36, 36, 36, 36, 40, 40, 42, 42, 42, 44, 46, 46, 48, 48, 48, 48, 52, 52, 54, 54, 54, 56, 58, 58, 60, 60, 60, 60, 60, 60, 66, 66, 66, 68, 70, 70, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) is even for n >= 3. a(n+1) >= a(n). - Robert Israel, Apr 18 2024
LINKS
MAPLE
A[1]:= 1:
for n from 2 to 100 do A[n]:= n - igcd(A[n-1], n) od:
seq(A[i], i=1..100); # Robert Israel, Apr 18 2024
MATHEMATICA
f[l_List] := Block[{n = Length[l] + 1}, Append[l, n - GCD[l[[ -1]], n]]]; Nest[f, {1}, 75] (* Ray Chandler, Dec 11 2006 *)
RecurrenceTable[{a[1]==1, a[n]==n-GCD[a[n-1], n]}, a, {n, 80}] (* Harvey P. Dale, Jul 05 2013 *)
CROSSREFS
Sequence in context: A083535 A250983 A070320 * A220662 A079584 A179291
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 06 2006
EXTENSIONS
Extended by Ray Chandler, Dec 11 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 04:46 EDT 2024. Contains 373140 sequences. (Running on oeis4.)