cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A008963 Initial digit of Fibonacci number F(n).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 1, 2, 3, 5, 8, 1, 2, 3, 6, 9, 1, 2, 4, 6, 1, 1, 2, 4, 7, 1, 1, 3, 5, 8, 1, 2, 3, 5, 9, 1, 2, 3, 6, 1, 1, 2, 4, 7, 1, 1, 2, 4, 7, 1, 2, 3, 5, 8, 1, 2, 3, 5, 9, 1, 2, 4, 6, 1, 1, 2, 4, 7, 1, 1, 3, 4, 8, 1, 2, 3, 5, 8, 1, 2, 3, 6, 9, 1, 2, 4, 6, 1, 1, 2, 4, 7, 1, 1, 3, 5, 8, 1
Offset: 0

Views

Author

Keywords

Comments

Benford's law applies since the Fibonacci sequence is of exponential growth: P(d)=log_10(1+1/d), in fact among first 5000 values the digit d=1 appears 1505 times, while 5000*P(1) is about 1505.15. - Carmine Suriano, Feb 14 2011
Wlodarski observed and Webb proved that the distribution of terms of this sequence follows Benford's law. - Amiram Eldar, Sep 23 2019

Crossrefs

Cf. A000045, A003893 (final digit).

Programs

  • Haskell
    a008963 = a000030 . a000045  -- Reinhard Zumkeller, Sep 09 2015
  • Maple
    F:= combinat[fibonacci]:
    a:= n-> parse(""||(F(n))[1]):
    seq(a(n), n=0..100);  # Alois P. Heinz, Nov 22 2023
  • Mathematica
    Table[IntegerDigits[Fibonacci[n]][[1]], {n, 0, 100}] (* T. D. Noe, Sep 23 2011 *)
  • PARI
    vector(10001,n,f=fibonacci(n-1);f\10^(#Str(f)-1))
    

Formula

a(n) = A000030(A000045(n)). - Amiram Eldar, Sep 23 2019
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{d=1..9} d*log(1+1/d)/log(10) = 3.440236... (A213201). - Amiram Eldar, Jan 12 2023
For n>5, a(n) = floor(10^{alpha*n-beta}), where alpha=log_10(phi), beta=log_10(5)/2, {x}=x-floor(x) denotes the fractional part of x, log_10(phi) = A097348, and phi = (1+sqrt(5))/2 = A001622. - Hans J. H. Tuenter, Aug 20 2025