OFFSET
1,1
COMMENTS
A007895(a(n)) = 5. - Reinhard Zumkeller, Mar 10 2013
Numbers that are the sum of five non-consecutive Fibonacci numbers. Their Zeckendorf representation thus consists of five 1's with at least one 0 between each pair of 1's; for example, 122 is represented as 1001010101. - Alonso del Arte, Nov 17 2013
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
88 = 55 + 21 + 8 + 3 + 1.
122 = 89 + 21 + 8 + 3 + 1.
135 = 89 + 34 + 8 + 3 + 1.
140 = 89 + 34 + 13 + 3 + 1.
142 = 89 + 34 + 13 + 5 + 1.
81 is not in the sequence because, although it is the sum of five Fibonacci numbers (81 = 5 + 8 + 13 + 21 + 34), its Zeckendorf representation only has three terms: 81 = 55 + 21 + 5.
MAPLE
with(combinat): B := proc (n) local A, ct, m, j: A := proc (n) local i: for i while fibonacci(i) <= n do n-fibonacci(i) end do end proc: ct := 0: m := n: for j while 0 < A(m) do ct := ct+1: m := A(m) end do: ct+1 end proc: Q := {}: for i from fibonacci(11)-1 to 400 do if B(i) = 5 then Q := `union`(Q, {i}) else end if end do: Q;
MATHEMATICA
zeck = DigitCount[Select[Range[3000], BitAnd[#, 2*#] == 0 &], 2, 1];
Position[zeck, 5] // Flatten (* Jean-François Alcover, Jan 30 2018 *)
PROG
(Haskell)
a179245 n = a179245_list !! (n-1)
a179245_list = filter ((== 5) . a007895) [1..]
-- Reinhard Zumkeller, Mar 10 2013
(PARI) A048680(n)=my(k=1, s); while(n, if(n%2, s+=fibonacci(k++)); k++; n>>=1); s
[A048680(n)|n<-[1..100], hammingweight(n)==5] \\ Charles R Greathouse IV, Nov 17 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Jul 05 2010
STATUS
approved