OFFSET
0,4
COMMENTS
Binet's formula is Fibonacci(k) = (phi^k - psi^k)/sqrt(5), with phi being the golden ratio (1 + sqrt(5))/2, and psi = (1 - sqrt(5))/2. For even values of k, Fibonacci(k) = floor((phi^k)/sqrt(5)) since psi^(2*k)/sqrt(5) < 0.17^k for all k > 0, and from which the formula below.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..3000
FORMULA
MAPLE
a:= n-> `if`(n=0, 1, floor(2^n*log[10]((1+sqrt(5))/2)-log[10](5)/2)+1):
seq(a(n), n=0..35); # Alois P. Heinz, Jul 30 2025
MATHEMATICA
a[n_] := IntegerLength[Fibonacci[2^n]]; Array[a, 30, 0] (* Amiram Eldar, Jul 30 2025 *)
A385248[n_] := If[n == 0, 1, Floor[2^n*Log10[GoldenRatio] - Log10[5]/2] + 1];
Array[A385248, 50, 0] (* Paolo Xausa, Aug 07 2025 *)
PROG
(Python)
from sympy import Rational, log, sqrt # uses symbolic computation
phi = (1+sqrt(5))/2
def a(n): return 1 if n==0 or n==1 else int(2**n *log(phi)/log(10)-Rational(1, 2)*log(5)/log(10))+1
(PARI) a(n) = #Str(fibonacci(2^n)); \\ Michel Marcus, Jul 30 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Juande Santander-Vela, Jul 28 2025
EXTENSIONS
More terms from Michel Marcus, Jul 30 2025
a(29)-a(35) from Amiram Eldar, Jul 30 2025
STATUS
approved
