A145279 Fecundity of n-th Fibonacci number.
0, 10, 10, 9, 9, 1, 7, 7, 5, 2, 1, 3, 1, 5, 8, 0, 5, 2, 1, 3, 1, 0, 1, 1, 7, 0, 2, 3, 3, 5, 0, 1, 0, 5, 0, 1, 0, 5, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 1, 3, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0
Offset: 0
Examples
Fib(6)=8 -> 8+8=16 -> 16+1*6=22 -> 22+2*2=26 -> 26+2*6=38 -> 38+3*8=62 -> 62+6*2=74 -> 74+7*4=102 -> 7 steps to reach a zero digit.
Programs
-
Maple
P:=proc(i) local a,b,c,d,f,g,ok,k,w,n; d:=0; f:=1; print(d); print(10); for n from 0 by 1 to i do a:=d+f; g:=f; f:=a; d:=g; b:=1; c:=0; ok:=1; while ok=1 do k:=a; w:=1; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w=0 then ok:=0; else c:=c+1; a:=a+w; fi; od; print(c); od; end: P(200);
-
Mathematica
f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 2; Array[f@ Fibonacci@# &, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)
Comments