login
A189920
Zeckendorf representation of natural numbers.
17
1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1
OFFSET
1
COMMENTS
The row lengths sequence of this array is A072649(n), n >= 1.
Note that the Fibonacci numbers F(0)=0 and F(1)=1 are not used in this unique representation of n >= 1. No neighboring Fibonacci numbers are allowed (no 1,1, subsequence in any row n).
REFERENCES
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed., 1994, Addison-Wesley, Reading MA, pp. 295-296.
E. Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41.3-4 (1972) 179-182 (with the proof from 1939).
LINKS
FORMULA
n = Sum_{m=1..rl(n)} a(n,m)*F(rl(n) + 2 - m), n >= 1, with rl(n):=A072649(n)(row length) and F(n):=A000045(n) (Fibonacci numbers).
T(n,k) = A213676(n, A072649(n, k)-1) for k = 1..A072649(k). - Reinhard Zumkeller, Mar 10 2013
EXAMPLE
n=1: 1;
n=2: 1, 0;
n=3: 1, 0, 0;
n=4: 1, 0, 1;
n=5: 1, 0, 0, 0;
n=6: 1, 0, 0, 1;
n=7: 1, 0, 1, 0;
n=8: 1, 0, 0, 0, 0;
n=9: 1, 0, 0, 0, 1;
n=10: 1, 0, 0, 1, 0;
n=11: 1, 0, 1, 0, 0;
n=12: 1, 0, 1, 0, 1;
n=13: 1, 0, 0, 0, 0, 0;
...
1 = F(2),
6 = F(5) + F(2),
11 = F(6) + F(4).
MATHEMATICA
f[n_] := (k = 1; ff = {}; While[(fi = Fibonacci[k]) <= n, AppendTo[ff, fi]; k++]; Drop[ff, 1]); a[n_] := (fn = f[n]; xx = Array[x, Length[fn]]; r = xx /. {ToRules[ Reduce[ And @@ (0 <= # <= 1 & ) /@ xx && fn . xx == n, xx, Integers]]}; Reverse[ First[ Select[ r, FreeQ[ Split[#], {1, 1, ___}] & ]]]); Flatten[ Table[ a[n], {n, 1, 25}]] (* Jean-François Alcover, Sep 29 2011 *)
PROG
(Haskell)
a189920 n k = a189920_row n !! k
a189920_row n = z n $ reverse $ takeWhile (<= n) $ tail a000045_list where
z x (f:fs'@(_:fs)) | f == 1 = if x == 1 then [1] else []
| f == x = 1 : replicate (length fs) 0
| f < x = 1 : 0 : z (x - f) fs
| f > x = 0 : z x fs'
a189920_tabf = map a189920_row [1..]
-- Reinhard Zumkeller, Mar 10 2013
CROSSREFS
Sequence in context: A266666 A068427 A190191 * A318963 A350600 A295896
KEYWORD
nonn,easy,tabf,base
AUTHOR
Wolfdieter Lang, Jun 12 2011
STATUS
approved