I've been working on this for far too long with unsatisfactory results. And after losing all my hours of work around 4am thanks to a glitch in the program itself, I'm at my wit's end.
It was suggested to use tables and intersection, but I simply cannot figure out for the life of me how to do it like that. I've constructed a matrix have been trying to use position to pull the Fibonacci values from the relevant indices.
Mathematica is completely new to me, and the CS prerequisite course before this one was woefully inadequate for any kind of useful coding. And unfortunately, our professor is 'not a programmer', so the help is not always as helpful as would be helpful.
This is what I have so far:
n = 5;
a = 1000;
(*fib=For[i=0;f=0;f1=0;f2=1;m=0,i\[LessEqual]n;f<a,i++;m++,f=f1+f2;f1=\
f2;f2=f;in=3m+1;Print[{i,in,f1}]]*)
fibindex = Table[x++, {x, i}]
fibtb = Table[Fibonacci[f], {f, i}]
Print[i]
indfrm = Table[3 b + 1, {b, i}]
fibmat = {Table[x++, {x, i}], Table[Fibonacci[f], {f, i}]} //
MatrixForm
MatrixForm[{fibindex, fibtb}]
Intersection[indfrm, fibindex]
Position[fibindex, 3 b + 1]
Any and all help will be greatly appreciated. Thanks.
In[16]:= imax = 2 + Floor[Log[GoldenRatio, 1000]] Out[16]= 16 In[18]:= Table[Fibonacci[j], {j, 1, imax, 3}] Out[18]= {1, 3, 13, 55, 233, 987}
$\endgroup$Solve[Mod[Fibonacci[n], 2] == 1, n, Integers]
$\endgroup$Resolve[ForAll[m, 0 <= m < ArgMin[{n, 0 <= n <= 1000 && Fibonacci[3 n + 1] >= 1000}, n, Integers], Mod[Fibonacci[3 m + 1], 2] == 1], Integers]
- the only less obvious parts here are constraining maximum values ofn
andm
. $\endgroup$