A050170 a(1) = 1, a(n) = floor(a(n-1)/sqrt(5)) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = floor(a(n-1)*sqrt(5)).
1, 2, 4, 8, 3, 6, 13, 5, 11, 24, 10, 22, 9, 20, 44, 19, 42, 18, 40, 17, 7, 15, 33, 14, 31, 69, 30, 67, 29, 12, 26, 58, 25, 55, 122, 54, 120, 53, 23, 51, 114, 50, 111, 49, 21, 46, 102, 45, 100, 223, 99, 221, 98, 43, 96, 214, 95, 212, 94, 210
Offset: 1
Links
- Ivan Neretin, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = If[FreeQ[Join[{0}, Array[a, n-1]], f = Floor[a[n-1]/Sqrt[5]]], f, Floor[a[n-1]*Sqrt[5]]]; Array[a, 60] (* Jean-François Alcover, Sep 12 2017 *)
Comments