How do I plot the Fibonacci sequence (using tikzpicture preferably)?
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xmin=0, xmax=30, ymin=2, ymax=3]
\addplot[samples at={1,2,...,30}, only marks] expression {<Add Fibonacci sequence here>};
\end{axis}
\end{tikzpicture}
\end{document}
Edit
Since it seems more complicated than I thought, I went for the following solution: plot the discrete version of the continuous Fibonacci function, see for instance here. Any suggestions are surely still welcomed.
So now it goes like this:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xmin=0, xmax=8, ymin=0, ymax=14, xlabel=$n$, ylabel=$a_n$, axis x line=center, axis y line=center]
\addplot[samples at={0,1,...,7},only marks] expression {( ((1+sqrt(5))/(2))^\x - cos(deg(\x * pi)) * ((1+sqrt(5))/(2))^(-\x) )/sqrt(5) };
\end{axis}
\end{tikzpicture}
\end{document}





\documentclassand the appropriate packages that sets up the problem.While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.
– AML Jun 19 '18 at 14:45\sqrt(x^2 + 4)forF_n(x)that's why I wrote it - for optical reasons - as such in the code. – DeeCeeDelux Jun 19 '18 at 19:29