A General Fibonacci Number Calculator version 3.1 (September 2016)
This multi-precision Calculator will find terms of a General Fibonacci Sequence G which has two given starting values:
G(0)=a and G(1)=b and then uses the Fibonacci Rule: "add the two previous values to get the next" with the
sequence extending backwards too (for negative indices).
We write
G(a,b,i) for the i-th term but a and b will be constant for a particular G series. The Fibonacci numbers
F(i) are G(0,1,i) and the Lucas numbers L(i) are G(2,1,i).
The Calculator can produce numbers with thousands of decimal digits, thanks to the
BigNumber Javascript functions package.
for example: Fib(9 007 199 254 740 991) has 1 88239 33175 09687 digits.
Spaces in the input box numbers are ignored.
Click on the title links to go to an introductory section of a page on this site on that topic.
Benford's Law states that the initial digit of many mathematical series as well as
natural data (such as populations of countries and sizes of lakes) have a precise rule that determines how popular
is the first digit. 1 is the most popular, 2 is less popular through to the least popular initial digit: 9.
Here you can plot initial digits or the first two digits for a range of values in any G series and examine the data for
yourself, shown as a frequency bar chart of the first one or the first two digits of
the Fibonacci, Lucas of General Fibonacci function in the given range of indices.
The output also shows the list of frequencies for first digits 1-9 or first two digits 10-99 which
is ready for copying into a spreadsheet for further investigation.
The Mathematics of the Fibonacci Numbers page
has a section on the periodic nature of the remainders when we divide the Fibonacci numbers by any number (the modulus).
The Calculator on this page lets you examine this for any G series.
Also every number n is a factor of some Fibonacci number. But this is not true of all G series. The first G series
number which has n as a factor is called the Entry Point of n in that series.
also called the Fibonacci Word and the Golden String
This sequence of bits is related to the Powers of Phi, the golden ratio which is Phi = (√5 + 1)/2 = 1.6180339...
and phi = 1/Phi = Phi−1 = (√5 − 1)/2 = 0.6180339... and also to
multiples of Phi.
The button
finds an amazing formula that looks impossible but is true. For example
Calculations can be exact with many decimal digits or approximations with the first few digits only being shown:
exactly (in full)
The computations can be of extremely large numbers (many thousands of digits) and are exact but larger numbers
take more time to calculate and your browser may appear to hang. For example F(1000) has 209 digits and will
probably take less than one second
to compute (it may take longer on an older computer). Tip: Always try the "approximate" or "the number of digits in"
option first (immediate results always) to see how many digits it has:
approximately
the first few places are calculated together with the number of digits and the last few places eg
Fib(1 000) is approximately 4.3466557686937346×10208, the last 4 digits are 8875
Fib(1 000 000) is approximately 1.9532821287077577×10208987 the last 4 digits are 6875
Fib(1 000 000 000) is approximately 7.9523178745546845×10208987639, the last 4 digits are 6875
Fib(1 000 000 000 000) is approximately 4.258422688995884×10208987640249, the last 4 digits are 6875
To find the final digits, use the button and supply the modulus in the input box.
This finds the remainder when G(a,b,i) is divided by the mod for your given value(s) of a, b and i.
If the mod is 100, it finds the last 2 digits, if the mod is 1000 then the last 3 etc. For example:
the final 5 digits of FIB(1000) are given by FIB(1000) mod 100000 = 28875
the final 5 digits of FIB(10000) are given by FIB(10000) mod 100000 = 66875
and for all larger powers of 10, Fib(10000.....0) ends in 46875 Why do they all end with ..46875?
See The Mathematical Magic of the Fibonacci Numbers.
The limit for approximate results with this Calculator is around Fib(47840000) for Fibonacci numbers
or in general the limit is numbers with 100 00000 digits.
Approximate values are calculated immediately for any size of index, larger values being given in a
scientific notation, for example:
1234 is 1.234×103.
For very large numbers, you can specify the number of digits per line and
indicate if you want them broken up into 5-digit blocks with a space
separator too.
C A L C U L A T O R for Fibonacci and General Fibonacci (G) Sequences
G(a,b,0)=a, G(a,b,1)=b, G(a,b,i) = G(a,b,i−1) + G(a,b,i−2) for any integer i
the General Fibonacci series
action buttons
G(a,b,0) = a =
G(a,b,1) = b =
for i = up to
for up to
Rabbit Sequence (Fibonacci Word) and Phi
for i= up to
R E S U L T S
For large numbers: number of digits per line=
with 5-digit blocks separated: