login
A143250
Reverse binary expansion of the Fibonacci numbers.
0
1, 1, 1, 3, 5, 1, 11, 21, 17, 59, 77, 9, 151, 317, 281, 879, 1507, 389, 5441, 5835, 4309, 31313, 18427, 1197, 69961, 71863, 68605, 423129, 354527, 83155, 1534501, 2633505, 1177835, 7573621, 9646897, 887751, 20771357, 38811817, 18203279, 110884035
OFFSET
1,4
COMMENTS
Old name was "Sequence of sum of Gray code Binary digits for Fibonacci sequence A000045: a(n) = GrayCodeBinarySum(A000045(n))".
FORMULA
a(n) = Decimal(reverse(Binary(A000045(n)))).
MATHEMATICA
GrayCodeList[k_] := Module[{b = IntegerDigits[k, 2], i}, Do[ If[b[[i - 1]] == 1, b[[i]] = 1 - b[[i]]], {i, Length[b], 2, -1} ]; b ]; a[n_] = GrayCodeList[Fibonacci[n]]; a0 = Table[Sum[a[n][[m + 1]]*2^m, {m, 0, Length[a[n]] - 1}], {n, 1, 200}]
Table[FromDigits[Reverse[IntegerDigits[Fibonacci[n], 2]], 2], {n, 40}] (* Bruno Berselli, May 01 2013 *)
PROG
(PARI) a(n) = {my(v=binary(fibonacci(n)), s); forstep(i=#v, 1, -1, s+=s+v[i]); return (s); } \\ Michel Marcus, May 01 2013
(Magma) [Seqint(Reverse(Intseq(Fibonacci(n), 2)), 2): n in [1..40]]; // Bruno Berselli, May 01 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited and new name by Michel Marcus, May 01 2013
STATUS
approved