|
|
A169747
|
|
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
|
|
|
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, 25, 1, 24, 13, 37, 4, 33, 17, 50, 3, 47, 20, 67, 7, 60, 27, 87, 2, 85, 25, 110, 9, 101, 16, 117, 5, 112, 11, 123, 14, 109, 25, 84, 1, 83, 24, 59, 13, 46, 37, 83, 4, 79, 33, 112, 17, 95
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
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]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|