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!)
A075825 a(0) = 1, a(1) = 2; for n>0, a(2n) = |a(n)-a(n-1)|, a(2n+1) = a(n)+a(n-1). 3
1, 2, 1, 3, 1, 3, 2, 4, 2, 4, 2, 4, 1, 5, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 3, 5, 4, 6, 3, 7, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 3, 9, 2, 8, 1, 9, 2, 10, 3, 9, 4, 10, 3, 11, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4, 12, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
For 2*2^k-2 <= n <= 3*2^k-1, a(n) alternates: 2^floor(k/2) if n is even, A029744(k+2) if n is odd. - Robert Israel, Nov 08 2016
LINKS
MAPLE
A[0]:= 1: A[1]:= 2:
for n from 1 to 100 do
A[2*n]:= abs(A[n]-A[n-1]);
A[2*n+1]:= A[n]+A[n-1];
od:
seq(A[n], n=0..201); # Robert Israel, Nov 08 2016
MATHEMATICA
a[0]=1; a[1]=2; a[n_]:=If[EvenQ[n], Abs[a[n/2]-a[n/2-1]], a[(n-1)/2]+a[(n-3)/2]]; Array[a, 95, 0] (* Stefano Spezia, Apr 04 2024 *)
CROSSREFS
Cf. A029744.
Sequence in context: A329632 A014599 A274771 * A309155 A007735 A002616
KEYWORD
nonn,look
AUTHOR
John W. Layman, Oct 14 2002
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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)