Question: Completing Fibonacci definitions

 

I''m looking to complete the following, and then use the 2nd to find what n for which Fn is divisible by f(3),  not sure where to start..any help much appreciated..

 

proc(f::procedure,s::posint,r::posint,c::posint)
description
"Indicate divisibility of f(n) by s for n <= cr.",
"Write 'D' for divisible, else 'n'; r rows and c cols.";
local i, j, str, char;

for i from 0 to r-1 do
str := "";
for j from 1 to c do
if (f(c*i+j) mod s) = 0 then
str := cat(str,"D")
else
str := cat(str,"n")
end if
end do;
print(str)
end do
end proc; # s_div_f

and

proc(s::posint,r::posint,c::posint)
description
"Indicate divisibility of Fib(n) by m for n <= cr.",
"Write 'D' for divisible, else 'n'; r rows and c cols.";
---MORE STUFF HERE---
end proc; # s_div_fib

 

Please Wait...