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, 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
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Comments