OFFSET
1,4
COMMENTS
Alternately, the minimum number of Fibonacci numbers which sum to prime(n). - Alan Worley, Apr 17 2015
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
prime(4)=7, and 7 is represented as 5+2, so a(4)=2.
prime(7)=17, and 17 is represented as 13+3+1, so a(7)=3.
MATHEMATICA
f[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; Count[fr, 1]]; f@# & /@ Prime@ Range@ 105 (* Robert G. Wilson v, Apr 22 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 05 2012
STATUS
approved