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.

A072352 a(n) is the largest n-digit Fibonacci number.

Original entry on oeis.org

8, 89, 987, 6765, 75025, 832040, 9227465, 63245986, 701408733, 7778742049, 86267571272, 956722026041, 6557470319842, 72723460248141, 806515533049393, 8944394323791464, 99194853094755497, 679891637638612258, 7540113804746346429, 83621143489848422977
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 17 2002

Keywords

Examples

			a(3)=987, as 987 is largest 3-digit Fibonacci number.
		

Crossrefs

Programs

  • Maple
    fib:= combinat:-fibonacci:
    g:= proc(x) local n;
      n:= floor(ln((2*x+1)*sqrt(5)/2)/ln((1+sqrt(5))/2));
      if fib(n) > x then while fib(n) > x do n:= n-1 od
      elif fib(n+1) <= x then while fib(n+1) <= x do n:= n+1 od
      fi;
      fib(n)
    end:
    seq(g(10^n),n=1..50); # Robert Israel, Mar 10 2016
    # second Maple program:
    F:= proc(n) option remember; local f;
          f:= `if`(n=1, [1$2], F(n-1));
          do f:= [f[2], f[1]+f[2]];
             if length(f[1]) F(n)[1]:
    seq(a(n), n=1..25);  # Alois P. Heinz, Mar 10 2016
  • Mathematica
    Table[k=1;While[Fibonacci@++k<10^n];Fibonacci[k-1],{n,20}] (* Giorgos Kalogeropoulos, Jul 06 2021 *)
  • Python
    def A072352_list(n):
        list = []
        x, y = 1, 1
        while len(list) < n:
            if len(str(x)) < len(str(y)):
                list.append(x)
            x, y = y, x + y
        return list
    print(A072352_list(20)) # M. Eren Kesim, Jun 28 2021

Formula

a(n) = A000045(A072353(n)). - Robert Israel, Mar 10 2016