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!)
A113925 a(1)=0. a(1)=1. a(n+2) = gcd(a(n+1) + a(n), n). 2

%I #11 Sep 03 2017 03:25:07

%S 0,1,1,2,3,1,1,2,1,1,1,2,1,3,1,2,3,1,1,2,1,1,1,2,1,3,1,2,3,1,1,2,1,1,

%T 1,2,1,3,1,2,3,5,1,6,1,1,1,2,1,3,1,2,3,1,1,2,1,1,1,2,1,3,1,2,3,1,1,2,

%U 1,1,1,2,1,3,1,2,3,1,1,2,1,1,1,2,1,3,1,2,3,1,1,2,1,1,1,2,1,3,1,2,3,5,1,6,1

%N a(1)=0. a(1)=1. a(n+2) = gcd(a(n+1) + a(n), n).

%C a(1)'s value is arbitrary. Replacing a(1) with any integer would not alter the rest of the sequence.

%H Harvey P. Dale, <a href="/A113925/b113925.txt">Table of n, a(n) for n = 1..1000</a>

%e a(14) = gcd(a(13) + a(12), 12) = gcd(1+2, 12) = gcd(3, 12) = 3.

%p a[1]:=0: a[2]:=1: for n from 3 to 135 do a[n]:=gcd(a[n-1]+a[n-2],n-2) od: seq(a[n],n=1..117); # _Emeric Deutsch_, Feb 07 2006

%t nxt[{n_,a_,b_}]:={n+1,b,GCD[a+b,n-1]}; NestList[nxt,{2,0,1},110][[All,2]] (* _Harvey P. Dale_, Jun 13 2017 *)

%K nonn

%O 1,4

%A _Leroy Quet_, Jan 30 2006

%E More terms from _Emeric Deutsch_, Feb 07 2006

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 April 25 10:34 EDT 2024. Contains 371967 sequences. (Running on oeis4.)