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.

Showing 1-10 of 10 results.

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

A050815 Number of positive Fibonacci numbers with n decimal digits.

Original entry on oeis.org

6, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1999

Keywords

Comments

If n>1 then a(n) = 4 or 5. - Robert Gerbicz, Sep 05 2002
The sequence is almost periodic, see also A072353. - Reinhard Zumkeller, Apr 14 2005

Examples

			At length 1 there are 6 such numbers: 1, 1, 2, 3, 5 and 8.
		

Crossrefs

See A098842 for another version.

Programs

  • Mathematica
    Drop[Last/@Tally[Table[IntegerLength[Fibonacci[n]],{n,505}]],-1] (* Jayanta Basu, Jun 01 2013 *)

Formula

Asymptotic mean: lim_{n->oo} (1/n) * Sum_{k=1..n} a(k) = log(10)/log(phi) = 1/A097348 = 4.7849719667... - Amiram Eldar, Jan 12 2022
For n>1, a(n) = 4+[{n*alpha+beta}<{alpha}], where alpha=log(10)/log(phi), beta=log(5)/(2*log(phi)), [X] is the Iverson bracket, {x}=x-floor(x), denotes the fractional part of x, and phi=(1+sqrt(5))/2. - Hans J. H. Tuenter, Jul 20 2025
a(n) = A072354(n+1)-A072354(n), a first-order difference. - Hans J. H. Tuenter, Jul 20 2025

A072353 a(n) is the index of the largest Fibonacci number containing n digits.

Original entry on oeis.org

6, 11, 16, 20, 25, 30, 35, 39, 44, 49, 54, 59, 63, 68, 73, 78, 83, 87, 92, 97, 102, 106, 111, 116, 121, 126, 130, 135, 140, 145, 150, 154, 159, 164, 169, 173, 178, 183, 188, 193, 197, 202, 207, 212, 216, 221, 226, 231, 236, 240, 245, 250, 255, 260, 264, 269, 274
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 17 2002

Keywords

Comments

Partial sums of A050815: a(n) = Sum_{k=1..n} A050815(k). - Reinhard Zumkeller, Apr 14 2005
Equivalently, a(n) is the number of Fibonacci numbers < 10^n including F(0) = 0 and F(1) = F(2) = 1 once. - Derek Orr, Jun 01 2014

Examples

			a(3)=16, as the 16th Fibonacci number is the largest Fibonacci number with 3 digits.
		

Crossrefs

Programs

  • Mathematica
    With[{fibs=Fibonacci[Range[300]]},Flatten[Position[fibs,#]&/@ Table[ Max[ Select[fibs,IntegerLength[#]==n&]],{n,60}]]] (* Harvey P. Dale, Nov 09 2011 *)
  • Python
    def A072353_list(n):
        list = []
        x, y, index = 1, 1, 1
        while len(list) < n:
            if len(str(x)) < len(str(y)):
                list.append(index)
            x, y = y, x + y
            index += 1
        return list
    print(A072353_list(57)) # M. Eren Kesim, Jul 19 2021

Formula

Limit_{n->oo} a(n)/n = 1/log_10((1+sqrt(5))/2) = 1/A097348 = 4.784... . - Reinhard Zumkeller, Apr 14 2005.
a(n) = floor(n*log(10)/log(phi)+log(5)/(2*log(phi))), where phi=(1+sqrt(5))/2, the golden ratio. - Hans J. H. Tuenter, Jul 08 2025

Extensions

More terms from Reinhard Zumkeller, Apr 14 2005
Name edited by Michel Marcus, Jul 19 2021

A068070 Number of digits in 10^n-th Fibonacci number.

Original entry on oeis.org

1, 2, 21, 209, 2090, 20899, 208988, 2089877, 20898764, 208987640, 2089876403, 20898764025, 208987640250, 2089876402500, 20898764024998, 208987640249979, 2089876402499787, 20898764024997874, 208987640249978734, 2089876402499787338, 20898764024997873377, 208987640249978733769
Offset: 0

Views

Author

Robert G. Wilson v, Feb 26 2002

Keywords

Comments

a(n)/10^n tends towards log_10((1+sqrt(5))/2) = 0.2089876402499787337692... = A097348. - Vladeta Jovovic, Mar 09 2002
This sequence is very close to A114469, the number of decimal digits in the Lucas number L(10^n). In fact, a(n) = A114469(n) or a(n) = A114469(n) - 1. The first difference occurs at a(1) as F(10) = 55 and L(10) = 123. The next differences occur at indices 8, 9, 16, 21, 23, 24, 27, 34, ... . - Hans J. H. Tuenter, Jul 21 2025:

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, floor(10^n*log[10]((1+sqrt(5))/2)-log[10](5)/2)+1):
    seq(a(n), n=0..21);  # Alois P. Heinz, Jul 30 2025
  • Mathematica
    Table[ Floor[ Log[10, Fibonacci[10^n]] + 1], {n, 0, 7} ]
    fib10[n_] := Block[{a = N[Log[10, Sqrt[5]/5], 64], b = N[Log[10, (1 + Sqrt[5])/2], 64]}, Floor[a + 10^n*b] + 1]; Table[ fib10[n], {n, 19}] (* Robert G. Wilson v, May 20 2005 *)
    FibonacciDigits[n_] := Ceiling[(2*n*ArcCsch[2] - Log[5])/Log[100]]; Table[ FibonacciDigits[10^n], {n, 19}]

Formula

Can be calculated easily using the fact that Fibonacci(n) is very close to GoldenRatio^n/(2*GoldenRatio-1) (cf. A000045). - Michael Taktikos, Aug 11 2004.
a(n) = 1+floor(10^n*log_10(phi)-log_10(5)/2), for n>0, where phi=(1+sqrt(5))/2, the golden ratio. - Hans J. H. Tuenter, Jul 08 2025.
a(n) = A055642(A250489(n)). - Alois P. Heinz, Jul 09 2025

Extensions

Corrected by Vladeta Jovovic, Sep 01 2004
a(19)-a(21) from Hans J. H. Tuenter, Jul 21 2025

A114469 Number of decimal digits in Lucas(10^n).

Original entry on oeis.org

1, 3, 21, 209, 2090, 20899, 208988, 2089877, 20898765, 208987641, 2089876403, 20898764025, 208987640250, 2089876402500, 20898764024998, 208987640249979, 2089876402499788, 20898764024997874, 208987640249978734, 2089876402499787338, 20898764024997873377, 208987640249978733770, 2089876402499787337693, 20898764024997873376928, 208987640249978733769273, 2089876402499787337692721
Offset: 0

Views

Author

Eric W. Weisstein, Nov 30 2005

Keywords

Comments

From Hans J. H. Tuenter, Jul 15 2025: (Start)
This sequence can be constructed by taking the first n digits of the decimal expansion of log_10(phi) = A097348 and adding 1. For example,
a(0) = 1,
a(1) = 2+1 = 3,
a(2) = 20+1 = 21,
a(3) = 208+1 = 209,
a(4) = 2089+1 = 2090,
a(5) = 20898+1 = 20899.
Alternatively, a(n)-1 is the first n digits of A097348. (End)
The individual digits of log_10(phi), and thus sequence A097348, can be extracted using d(n) = a(n)-10*a(n-1)+9. - Hans J. H. Tuenter, Jul 25 2025

Crossrefs

Cf. A068070. - R. J. Mathar, Dec 13 2008

Programs

Formula

Limit_{n->oo} a(n)/10^n = A097348. - Amiram Eldar, Apr 14 2022
a(n) = 1+floor(10^n*log_10(phi)), where phi = (1+sqrt(5))/2, the golden ratio. - Hans J. H. Tuenter, Jul 13 2025.
From Hans J. H. Tuenter, Jul 25 2025: (Start)
a(n) = 1 + Sum_{i=0..n} d(i)*10^(n-i),
a(n) = 10*a(n-1)-9+d(n),
where d(i) = A097348(i-1) is the coefficient of 10^(-i) in the decimal expansion of log_10(phi). (End)

Extensions

a(8)-a(10) from Amiram Eldar, Apr 14 2022
a(11)-a(25) from Hans J. H. Tuenter, Jul 15 2025

A217684 Continued fraction expansion for log_10((1+sqrt(5))/2).

Original entry on oeis.org

0, 4, 1, 3, 1, 1, 1, 6, 4, 2, 1, 10, 1, 4, 46, 3, 1, 2, 1, 1, 1, 1, 3, 16, 2, 5, 1, 3, 2, 2, 9, 1, 1, 1, 2, 6, 106, 2, 3, 1, 3, 1, 1, 16, 20, 1, 1, 1, 4, 37, 1, 6, 1, 2, 6, 1, 1, 4, 2, 1, 2, 72, 10, 1, 1, 2, 3, 8, 1, 1, 1, 1, 1, 2, 1, 2, 3, 9, 1, 2, 4, 3, 2, 9, 1, 4, 2, 2, 2, 4
Offset: 0

Views

Author

V. Raman, Oct 11 2012

Keywords

Comments

The significance of this sequence is that the convergents of the continued fraction expansion of log_10((1+sqrt(5))/2) give the sequence of fractions p/q such that Lucas(q) gets increasingly closer to 10^p. For example, the first few convergents are 0/1, 1/4, 1/5, 4/19, 5/24, 9/43, 14/67, 93/445.
Clearly as we can see below
Lucas(19) = 9349 ~ 10^4, error = 6.51%
Lucas(24) = 103682 ~ 10^5, error = 3.682%
Lucas(43) = 969323029 ~ 10^9, error = 3.068%
Lucas(67) = 100501350283429 ~ 10^14, error = 0.501%
In fact, for sufficiently large values of n, we will have that Lucas(n) ~ ((1+sqrt(5))/2)^n.

Crossrefs

Cf. A097348 (decimal expansion), A217685/A217686 (convergents).

Programs

  • Mathematica
    ContinuedFraction[Log[10, GoldenRatio], 90] (* Jean-François Alcover, Oct 17 2012 *)
  • PARI
    default(realprecision, 99); contfrac(log((1+sqrt(5))/2)/log(10))

A141053 Most-significant decimal digit of Fibonacci(5n+3).

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 01 2008

Keywords

Comments

Leading digit of A134490(n).
From Johannes W. Meijer, Jul 06 2011: (Start)
The leading digit d, 1 <= d <= 9, of A141053 follows Benford’s Law. This law states that the probability for the leading digit is p(d) = log_10(1+1/d), see the examples.
We observe that the last digit of A134490(n), i.e. F(5*n+3) mod 10, leads to the Lucas sequence A000032(n) (mod 10), i.e. a repetitive sequence of 12 digits [2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9] with p(0) = p(5) = 0, p(1) = p(3) = p(7) = p(9) = 1/6 and p(2) = p(4) = p(6) = p(8) = 1/12. This does not obey Benford’s Law, which would predict that the last digit would satisfy p(d) = 1/10, see the links. (End)

Examples

			From _Johannes W. Meijer_, Jul 06 2011: (Start)
d     p(N=2000) p(N=4000) p(N=6000) p(Benford)
1      0.29900   0.29950   0.30033   0.30103
2      0.17700   0.17675   0.17650   0.17609
3      0.12550   0.12525   0.12517   0.12494
4      0.09650   0.09675   0.09700   0.09691
5      0.07950   0.07950   0.07933   0.07918
6      0.06700   0.06675   0.06700   0.06695
7      0.05800   0.05825   0.05800   0.05799
8      0.05150   0.05125   0.05100   0.05115
9      0.04600   0.04600   0.04567   0.04576
Total  1.00000   1.00000   1.00000   1.00000 (End)
		

Crossrefs

Cf. A000045 (F(n)), A008963 (Initial digit F(n)), A105511-A105519, A003893 (F(n) mod 10), A130893, A186190 (First digit tribonacci), A008952 (Leading digit 2^n), A008905 (Leading digit n!), A045510, A112420 (Leading digit Collatz 3*n+1 starting with 1117065), A007524 (log_10(2)), A104140 (1-log_10(9)). - Johannes W. Meijer, Jul 06 2011

Programs

  • Maple
    A134490 := proc(n) combinat[fibonacci](5*n+3) ; end proc:
    A141053 := proc(n) convert(A134490(n),base,10) ; op(-1,%) ; end proc:
    seq(A141053(n),n=0..70) ; # R. J. Mathar, Jul 04 2011
  • Mathematica
    Table[IntegerDigits[Fibonacci[5n+3]][[1]],{n,0,70}] (* Harvey P. Dale, Jun 22 2025 *)

Formula

a(n) = floor(F(5*n+3)/10^(floor(log(F(5*n+3))/log(10)))). - Johannes W. Meijer, Jul 06 2011
For n>0, a(n) = floor(10^{alpha*n+beta}), where alpha=5*log_10(phi)-1, beta=log_10(1+2/sqrt(5)), {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 27 2025

Extensions

Edited by Johannes W. Meijer, Jul 06 2011

A386758 Number of decimal digits in the n-th Lucas number.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17
Offset: 0

Views

Author

Hans J. H. Tuenter, Aug 06 2025

Keywords

Comments

As F(n)<=L(n), the number of decimal digits of the Lucas number L(n) is at least as large as the number of decimal digits of the Fibonacci number F(n). Furthermore, the difference is at most one. The indices for which the difference is one is A386760.

Examples

			L(0)=2 has one digit, so that a(0)=1; L(5)=11 has two digits, so that a(5)=2.
		

Crossrefs

Number of digits of L(p^n): A094057 (p=2), A114469 (p=10).

Programs

  • Maple
    a:= n-> 1+floor(n*log[10]((1+sqrt(5))/2)):
    seq(a(n), n=0..81);
  • Mathematica
    a[n_] := IntegerLength[LucasL[n]]; Array[a, 100, 0] (* Amiram Eldar, Aug 16 2025 *)

Formula

a(n) = A055642(A000032(n)).
a(n) = 1 + floor(n*log_10(phi)), where log_10(phi) = A097348, and phi = (1+sqrt(5))/2 = A001622.

A386760 Numbers k such that the number of decimal digits of the Lucas number L(k) is greater than the number of decimal digits of the Fibonacci number F(k).

Original entry on oeis.org

5, 6, 10, 11, 15, 16, 20, 24, 25, 29, 30, 34, 35, 39, 44, 48, 49, 53, 54, 58, 59, 63, 67, 68, 72, 73, 77, 78, 82, 83, 87, 91, 92, 96, 97, 101, 102, 106, 111, 115, 116, 120, 121, 125, 126, 130, 134, 135, 139, 140, 144, 145, 149, 150, 154, 158, 159, 163, 164, 168
Offset: 1

Views

Author

Hans J. H. Tuenter, Aug 13 2025

Keywords

Comments

The difference in the number of decimal digits, A055642(L(k))-A055642(F(k)) = A060384(k)-A386758(k) is either zero or one. In fact, this difference is ceiling(beta-{k*alpha}), with alpha and beta as defined in the Formula section. This implies that, asymptotically, a fraction of beta=0.349485... of the Lucas numbers has one more decimal digit than the corresponding Fibonacci number. This gives the asymptotic behavior of the sequence as a(n)~n/beta. Conjecture: abs(a(n)-n/beta)

Examples

			5 is a term since F(5)=5 has length 1 decimal digit, but L(5)=11 has length 2 decimal digits which is greater.
		

Programs

  • Mathematica
    Select[Range[168],IntegerLength[LucasL[#]]>IntegerLength[Fibonacci[#]]&] (* James C. McMahon, Aug 28 2025 *)

Formula

The sequence consists of the integers k>=2, for which {k*alpha}A097348, and phi = (1+sqrt(5))/2 = A001622.

A318058 a(n) is the number of decimal places to which the n-th convergent of the continued fraction expansion of the golden section matches the correct value.

Original entry on oeis.org

0, -1, 0, 1, 1, 1, 2, 2, 2, 3, 2, 4, 4, 5, 5, 5, 6, 5, 7, 7, 8, 7, 9, 9, 9, 10, 10, 10, 11, 10, 12, 12, 13, 12, 13, 14, 15, 14, 15, 16, 16, 16, 17, 17, 17, 18, 18, 19, 18, 20, 20, 21, 21, 21, 22, 22, 23, 23, 24, 23, 24, 25, 25, 26, 26, 27, 27, 27, 28, 28, 29, 29, 29, 30, 30
Offset: 1

Author

A.H.M. Smeets, Aug 14 2018

Keywords

Comments

The correct decimal value of the golden section is given in A001622; the continued fraction terms of the golden section is given in A000012.
For the number of correct decimal digits of the golden section see A318057.
The denominator of the k-th convergent obtained from a continued fraction tend to k*A001622; the error between the k-th convergent and the constant itself tends to 1/(2*k*A001622), or in binary digits 2*k*log(A001622)/log(2) bits after the binary point.

Examples

			   n   convergent         decimal expansion     a(n)
  ==  =============  =========================  ====
   1    1 / 1         1.0                         0
   2    2 / 1         2.0                        -1
   3    3 / 2         1.5                         0
   4    5 / 3         1.66                        1
   5    8 / 5         1.60                        1
   6   13 / 8         1.62                        1
   7   21 / 13        1.615                       2
   8   34 / 21        1.619                       2
   9   55 / 34        1.617                       2
  10   89 / 55        1.6181                      3
  oo  lim = A001622   1.6180339887498948482      --
		

Programs

  • Python
    p, q, i, base = 1, 1, 0, 10
    while i < 20200:
        p, q, i = p+q, p, i+1
    a0, p, q = p//q, q, p
    i, p, dd = 0, p*base, [0]
    while i < 30000:
        d, p, i = p//q, (p%q)*base, i+1
        dd = dd+[d]
    n, pn, qn = 0, 1, 0
    while n < 20000:
        n, pn, qn = n+1, pn+qn, pn
        if pn//qn != a0:
            print(n, "- manual!")
        else:
            i, p, q, di = 0, (pn%qn)*base, qn, 0
            while di == dd[i]:
                i, di, p = i+1, p//q, (p%q)*base
            print(n, i-1)

Formula

Limit_{n -> oo} a(n)/n = 2*log(A001622)/log(10) = 2*A002390/log(10) = A202543/log(10) = 2*A097348.
Showing 1-10 of 10 results.