|
|
A050139
|
|
a(1)=2; for n > 1, a(n) = floor(a(n-1)/2) if this is not among 0, a(1), ..., a(n-1); otherwise a(n) = 4*n.
|
|
2
|
|
|
2, 1, 12, 6, 3, 24, 28, 14, 7, 40, 20, 10, 5, 56, 60, 30, 15, 72, 36, 18, 9, 4, 92, 46, 23, 11, 108, 54, 27, 13, 124, 62, 31, 136, 68, 34, 17, 8, 156, 78, 39, 19, 172, 86, 43, 21, 188, 94, 47, 200, 100, 50, 25, 216, 220, 110, 55, 232, 116
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Does this sequence contain every positive integer exactly once?
|
|
LINKS
|
|
|
MATHEMATICA
|
Delete[#, 3] &@ Nest[Append[#1, If[FreeQ[#1, #2], #2, 4 #3]] & @@ {#, Floor[#[[-1]]/2], Length@ #} &, {2}, 59] (* Michael De Vlieger, Oct 06 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|