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-9 of 9 results.

A060384 Number of decimal digits in n-th Fibonacci number.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 03 2001

Keywords

Crossrefs

Programs

  • Haskell
    a060384 = a055642 . a000045  -- Reinhard Zumkeller, Mar 09 2013
  • Maple
    with(combinat): a:=n->nops(convert(fibonacci(n),base,10)): 1,seq(a(n),n=1..100); # Emeric Deutsch, May 19 2007
  • Mathematica
    Table[IntegerLength@ Fibonacci@ n, {n, 0, 84}] /. 0 -> 1 (* or *)
    Table[Floor[n Log10@ GoldenRatio - Log10@ 5/2] + 1, {n, 0, 84}] /. 0 -> 1 (* Michael De Vlieger, Jul 04 2016 *)
  • PARI
    print1("1, 1, "); gold=(1+sqrt(5))/2; for(n=2,100,print1(floor((n*log(gold)-log(5)/2)/log(10))+1", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 01 2007
    
  • PARI
    a(n) = #Str(fibonacci(n)); \\ Michel Marcus, Jul 04 2016
    

Formula

a(n) = floor(n*log(tau)/log(10)) +0 or +1 where tau is the golden ratio. - Benoit Cloitre, Oct 29 2002. [Corrected by Hans J. H. Tuenter, Jul 07 2025].
a(n) = floor(n*log_10(gold) - log_10(5)/2) + 1 for n >= 2, where gold is (1+sqrt(5))/2. - Herman Jamke (hermanjamke(AT)fastmail.fm), May 01 2007
a(n) = A055642(A000045(n)). - Reinhard Zumkeller, Mar 09 2013

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 01 2007

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

A052005 Number of Fibonacci numbers (A000045) with length n in base 2.

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1
Offset: 1

Views

Author

Keywords

Comments

There are no double 2's except at the very start because multiplying by phi^3 adds at least 2 to Fn's binary length. For a similar reason there aren't any 3's because multiplying by phi^2 increments at least by one F(n)'s binary length.
Also a(n) is the number of Fibonacci numbers F(k) between powers of 2 such that 2^n <= F(k) < 2^(n+1). - Frank M Jackson, Apr 14 2013

Examples

			F(17) = 1597{10} = 11000111101{2} the only one of length 11 and F(18) = 2584{10} = 101000011000{2} the only one of length 12 so both a(11) and a(12) equal 1.
		

Crossrefs

Programs

  • Mathematica
    nmax = 105; kmax = Floor[ k /. FindRoot[ Log[2, Fibonacci[k]] == nmax, {k, nmax, 2*nmax}]]; A052005 = Tally[ Length /@ IntegerDigits[ Fibonacci[ Range[kmax]], 2]][[All, 2]] (* Jean-François Alcover, May 07 2012 *)
    termcount[n1_] := (m1=0; While[Fibonacci[m1]<2^n1, m1++]; m1); Table[termcount[n+1]-termcount[n], {n, 0, 200}] (* Frank M Jackson, Apr 14 2013 *)
    Most[Transpose[Tally[Table[Length[IntegerDigits[Fibonacci[n], 2]], {n, 140}]]][[2]]] (* T. D. Noe, Apr 16 2013 *)

Formula

Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log(2)/log(phi) = A104287. - Amiram Eldar, Nov 21 2021

A105563 a(n) = if (exactly 4 Fibonacci numbers exist with exactly n digits) then 1, otherwise 0.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 14 2005

Keywords

Comments

The sequence is almost periodic, see also A105564;
Asymptotically, a fraction of 1-alpha=0.215028... of the terms are 1. For the partial sums S(n) = Sum_{k=1..n} a(k), this implies S(n)~(1-alpha)*n. Conjecture: -beta < S(n)-(1-alpha)*n < 1-beta. The constants alpha and beta are as defined in the formula section. - Hans J. H. Tuenter, Aug 28 2025

Crossrefs

Programs

  • Mathematica
    If[#==4,1,0]&/@Tally[IntegerLength/@Fibonacci[Range[500]]][[;;,2]] (* Harvey P. Dale, Nov 15 2023 *)

Formula

a(n) = 1 - A105565(n), for n>1.
a(n) = 5 - A050815(n), for n>1. - Hans J. H. Tuenter, Aug 28 2025
For n>1, a(n) = [{n*alpha+beta}>alpha], where alpha=log(10)/log(phi)-4, beta=log(5)/(2*log(phi))-1, [] is the Iverson bracket, {x}=x-floor(x), denotes the fractional part of x, and phi = (1+sqrt(5))/2 = A001622. - Hans J. H. Tuenter, Aug 28 2025

A098842 Number of n-digit Fibonacci numbers.

Original entry on oeis.org

7, 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

Alex Vinokur (alexvn(AT)barak-online.net), Nov 03 2004

Keywords

Comments

a(1)=7 because the Fibonacci numbers having one digit are the first seven; then the next five have two digits, so a(2)=5.

Crossrefs

Essentially the same as A050815, which is the main entry for this sequence. Cf. A000045, A060384.

Programs

  • Haskell
    a098842 n = a098842_list !! (n-1)
    a098842_list = map length $ group a060384_list
    -- Reinhard Zumkeller, Mar 09 2013
  • Mathematica
    Join[{7},Rest[Length[#]&/@Split[IntegerLength[Fibonacci[Range[510]]]]]] (* Harvey P. Dale, Jul 19 2020 *)

Extensions

Corrected by Alexandre Wajnberg, Mar 28 2005

A105565 a(n) = if (exactly 5 Fibonacci numbers exist with exactly n digits) then 1, otherwise 0.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 14 2005

Keywords

Comments

The sequence is almost periodic, see also A105566;
a(n) = 1 - A105563(n), for n>1.
a(n) = A050815(n) - 4, for n>1. - Hans J. H. Tuenter, Jul 29 2025

Examples

			The Fibonacci numbers with two decimal digits are 13, 21, 34, 55, 89; a total of five, so that a(2)=1.
		

Crossrefs

Programs

  • Maple
    n:= 1: count:= 2: a:= 0: b:= 1:
    for m from 2 while n < 101 do
      c:= b; b:= a+b; a:= c;
      s:= ilog10(b)+1;
      if s = n then count:= count+1
      else
        if count = 5 then A[n]:= 1 else A[n]:= 0 fi;
        count:= 1; n:= s
      fi
    od:
    seq(A[i],i=1..100); # Robert Israel, Dec 17 2018

Formula

For n>1, a(n) = [{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 29 2025

A052006 Numbers k for which Fibonacci(k) is the first member of a 1,1 pair (A052005).

Original entry on oeis.org

17, 30, 43, 53, 66, 79, 89, 102, 115, 125, 138, 151, 161, 174, 187, 200, 210, 223, 236, 246, 259, 272, 282, 295, 308, 321, 331, 344, 357, 367, 380, 393, 403, 416, 429, 442, 452, 465, 478, 488, 501, 514, 524, 537, 550, 560, 573, 586, 599, 609, 622, 635, 645
Offset: 0

Views

Author

Keywords

Comments

Keep adding the terms of sequence A052005 up to the first member of the next 1,1 pair to yield the terms of this sequence. - Patrick De Geest
Those k for which F(k-1) < 2^(floor(log_2(F(k)))) and F(k+1) >= 2^(floor(log_2(F(k)))+1) and F(k+2) >= 2^(floor(log_2(F(k)))+2).

Crossrefs

The first differences are A051392.

Programs

  • Mathematica
    With[{F = Fibonacci}, Reap[For[n=0, n<1000, n++, If[F[n-1] < 2^Floor[Log[2, F[n]]] && F[n+1] >= 2^(Floor[Log[2, F[n]]]+1) && F[n+2] >= 2^(Floor[Log[ 2, F[n]]]+2), Print[n]; Sow[n]]]][[2, 1]]] (* Jean-François Alcover, Feb 27 2016 *)

A105566 Number of blocks of exactly 5 Fibonacci numbers having equal length <= n.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 30, 31, 31, 32, 33, 34, 34, 35, 36, 37, 38, 38, 39, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53, 54, 55, 56, 56, 57
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 14 2005

Keywords

Comments

a(n) = Sum_{k=1..n} A105565(k); a(n) = n - A105564(n);
lim_{n->inf} a(n)/n = 1/log_10((1+sqrt(5))/2) - 4 = 0.784....

References

  • Juergen Spilker, Die Ziffern der Fibonacci-Zahlen, Elemente der Mathematik 58 (Birkhäuser 2003).

Crossrefs

A117768 Number of Lucas numbers with n digits.

Original entry on oeis.org

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: 0

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 15 2006

Keywords

Crossrefs

Cf. A000204. Same as A050815 and A098842 but without the first 3 numbers.
Showing 1-9 of 9 results.