login
a(1)=1; thereafter, a(2n)=a(n), a(2n+1) = a(2n-1)-a(n) if that number is positive and not already in the sequence, otherwise a(2n+1) = a(2n-1)+a(n).
1

%I #4 May 01 2013 21:08:57

%S 1,1,2,1,3,2,5,1,4,3,7,2,9,5,14,1,13,4,17,3,20,7,27,2,25,9,16,5,11,14,

%T 25,1,24,13,37,4,33,17,50,3,47,20,67,7,60,27,87,2,85,25,110,9,101,16,

%U 117,5,112,11,123,14,109,25,84,1,83,24,59,13,46,37,83,4,79,33,112,17,95

%N a(1)=1; thereafter, a(2n)=a(n), a(2n+1) = a(2n-1)-a(n) if that number is positive and not already in the sequence, otherwise a(2n+1) = a(2n-1)+a(n).

%C Suggested by A005132, A030067, A109671.

%H Zak Seidov, <a href="/A169747/b169747.txt">Table of n, a(n) for n = 1..1000</a> [From _Zak Seidov_, May 04 2010]

%t a={1,1};Do[c=If[EvenQ[n],a[[n/2]],If[(b=a[[n-2]]-a[[(n-1)/2]])>0&&FreeQ[a,b],b,a[[n-2]]+a[[(n-1)/2]]]];AppendTo[a,c],{n,3,1000}];a [From _Zak Seidov_, May 04 2010]

%K nonn

%O 1,3

%A _N. J. A. Sloane_, May 02 2010

%E More terms from _Zak Seidov_, May 04 2010