Given any prefix, there is always a Fibonacci number with that prefix (and in fact, infinitely many such Fibonacci numbers). See André's answer. Basically, $F_n$ is the integer closest to $\frac{\phi^n}{\sqrt{5}}$, so given a prefix $p$, you're trying to find an $n$ such that for some number $k$, you have $$(p)10^k < \frac{\phi^n}{\sqrt{5}} < (p+1)10^k$$. See my [answer to this question](math.stackexchange.com/questions/46100/…) for an explicit way of finding such $n$.
–
ShreevatsaROct 22 '11 at 17:04

2 Answers
2

Given any prefix, there is always a Fibonacci number (and in fact, infinitely many Fibonacci numbers) with that prefix. Just for completeness, here is an elaboration of André's answer, which also answers the "if yes then to which one" part.

I'll work with a specific prefix, $42$, but the method is general. So you're trying to find a Fibonacci number $F_n$ which starts with $42$: that is, for some number $k$,
$$4.2\cdot10^k \le F_n < 4.3\cdot10^k$$
Because $F_n$ is always the integer closest to $\frac{\phi^n}{\sqrt5}$ (where $\phi = \frac{1+\sqrt 5}2$ is the golden ratio), this is (almost) the same as:
$$4.2\cdot10^k \le \frac{\phi^n}{\sqrt{5}} < 4.3\cdot10^k$$
So let's solve that instead. (The "almost" is because $\frac{\phi^n}{\sqrt5}$ could lie in $(4.3\cdot10^k - 0.5, 4.3\cdot10^k)$ so that $F_n = 4.3\cdot10^k$, but in that case we can just try again and find another $n$… or pick something like $425$ as the prefix to start with.)

Let $\alpha = \frac{\log 4.2 + \log 4.3}{2} + \log{\sqrt5}$ be the midpoint of the interval in which you want $n\log\phi$ to lie, and let $\beta = \frac{\log 4.3 - \log 4.2}{2}$ be the width of that interval.

Pick relatively prime $a$ and $b$ such that $|b\log\phi - a| < \frac1b$. For instance, you can pick a convergent $\frac{a}{b}$ of the continued fraction of $\log \phi$. Let $b$ be large enough so that $\frac3b \le \frac{\beta}{2}$, i.e., $b \ge \frac6{\beta}$. (In practice, a smaller $b$ will also do.)

Note that doing the calculation with the previous convergent $\frac{93}{445}$ will give the earlier Fibonacci number $F_{665} = 423931574\dots49753165$ (139 digits), and there are earlier Fibonacci numbers like $F_{86} = 420196140727489673$ and $F_{153} = 42230279526998466217810220532898$, most of which you can get by starting with semiconvergents (for instance you get $F_{86}$ if you start with $\frac{23}{110}$, and $F_{153}$ if you start with $\frac{51}{244}$).

So this method may not(?) give the smallest Fibonacci number with a given prefix, but it is a fast way of finding infinitely many such Fibonacci numbers.

If for arbitrarily large $n$, $\frac{\varphi^n}{\sqrt{5}}$ has any specified prefix $P$, then for arbitrarily large $n$, $F_n$ has any specified prefix $Q$. (If we are worried about a prefix like $2000$, change it to $20001$. If $\frac{\varphi^n}{\sqrt{5}}$ has $20001$ as a prefix, and $n$ is large, then $F_n$ has $2000$ as a prefix.)

Now we show that for any $P$, there are infinitely many $n$ such that $\frac{\varphi^n}{\sqrt{5}}$ has prefix $P$. Consider $\log_{10}\frac{\varphi^n}{\sqrt{5}}=n\,\log_{10}\varphi -\log_{10}\sqrt{5}$.
It is easy to show that $\log_{10}\, \varphi$ is irrational. Thus the fractional parts of $n\,\log_{10}\varphi$, as $n$ ranges over the natural numbers, are dense in the unit interval, and therefore so are the fractional parts of $n\,\log_{10}\varphi -\log_{10}\sqrt{5}$. The result follows.

Comment: The above solution gives no real information about the "if so which one" part of the question. There are infinitely many. One would like to produce a decent upper bound for the smallest one. Calculations I have made with continued fractions for very similar problems, such as producing a specified prefix for $2^n$, have not given good bounds.

The fractional parts are not just dense but uniformly distributed, and better yet, good estimates are known for its discrepancy. So there's a pretty good chance that any given $k$-digit prefix shows up for some $n\le10^k$, and using the discrepancy you can probably get a bound not all that much bigger than $10^k$ by which time every $k$-digit prefix has turned up.
–
Gerry MyersonOct 24 '11 at 5:04