A369715 Number of digits of phi (the golden ratio) correctly approximated by Fibonacci(n+1) / Fibonacci(n).
1, 0, 1, 2, 2, 2, 3, 3, 3, 4, 3, 5, 5, 6, 6, 6, 7, 6, 8, 8, 9, 8, 10, 10, 10, 11, 11, 11, 12, 11, 13, 13, 14, 13, 14, 15, 16, 15, 16, 17, 17, 17, 18, 18, 18, 19, 19, 20, 19, 21, 21, 22, 22, 22, 23, 23, 24, 24, 25, 24, 25, 26, 26, 27, 27, 28, 28, 28, 29, 29, 30, 30, 30
Offset: 1
Examples
For n=1, 1/1 = 1 matches the first digit of phi (1.618033), so a(1) = 1 For n=2, 2/1 = 2 which matches no digits of phi (1.618033), so a(2) = 0 For n=12, F(13)/F(12) = 1.6180 55... = 233/144 phi = 1.6180 33... ^ ^^^^ a(12) = 5 matching digits
Links
- David Consiglio, Jr., Table of n, a(n) for n = 1..1000
Programs
-
Python
from math import isqrt fib = [1,1] terms = [] while len(terms) < 1000: deg = 0 target = 0 test = 0 while target == test: target = (10**deg+isqrt(5*10**(2*deg)))//2 test = (10**deg*(fib[-1]))//fib[-2] deg += 1 terms.append(deg-1) fib.append(fib[-1]+fib[-2]) print(terms)