login
A050196
a(1) = 1, a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = a(n-1) + a(n-2).
7
1, 1, 2, 3, 5, 8, 4, 12, 6, 18, 9, 27, 13, 40, 20, 10, 30, 15, 7, 22, 11, 33, 16, 49, 24, 73, 36, 109, 54, 163, 81, 244, 122, 61, 183, 91, 45, 136, 68, 34, 17, 51, 25, 76, 38, 19, 57, 28, 14, 42, 21, 63, 31, 94, 47, 23, 70, 35, 105, 52, 26
OFFSET
1,3
LINKS
MATHEMATICA
Nest[Append[#, If[MemberQ[Append[#, 0], r = Quotient[#[[-1]], 2]], #[[-1]] + #[[-2]], r]] &, {1, 1}, 59] (* Ivan Neretin, Mar 02 2016 *)
CROSSREFS
Cf. A050000.
Sequence in context: A268134 A021428 A238207 * A122597 A323890 A105836
KEYWORD
nonn
STATUS
approved