OFFSET
1,1
COMMENTS
A007895(a(n)) = 2. - Reinhard Zumkeller, Mar 10 2013
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
4 = 1+3;
6 = 1+5;
7 = 2+5;
9 = 1+8;
10 = 2+8;
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(5)-1 to 400 do if B(i) = 2 then Q := `union`(Q, {i}) else end if end do: Q;
MATHEMATICA
f[n_] := (k = 1; ff = {}; While[(fi = Fibonacci[k]) <= n, AppendTo[ff, fi]; k++]; Drop[ff, 1]); z[n_] := If[n == 0, 0, r = n; s = {}; fr = f[n]; While[r > 0, lf = Last[fr]; If[lf <= r, r = r - lf; PrependTo[s, lf]]; fr = Drop[fr, -1]]; s]; Select[ Range[400], Length[z[#]] == 2 &] (* Jean-François Alcover, Sep 27 2011 *)
zeck = DigitCount[Select[Range[5000], BitAnd[#, 2*#] == 0&], 2, 1];
Position[zeck, 2] // Flatten (* Jean-François Alcover, Jan 25 2018 *)
PROG
(Haskell)
import Data.List (inits)
a179242 n = a179242_list !! (n-1)
a179242_list = concatMap h $ drop 3 $ inits $ drop 2 a000045_list where
h is = reverse $ map (+ f) fs where
(f:_:fs) = reverse is
-- Reinhard Zumkeller, Mar 10 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jul 05 2010
STATUS
approved