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.

A369715 Number of digits of phi (the golden ratio) correctly approximated by Fibonacci(n+1) / Fibonacci(n).

This page as a plain text file.
%I A369715 #46 Feb 03 2024 10:12:37
%S A369715 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,
%T A369715 13,13,14,13,14,15,16,15,16,17,17,17,18,18,18,19,19,20,19,21,21,22,22,
%U A369715 22,23,23,24,24,25,24,25,26,26,27,27,28,28,28,29,29,30,30,30
%N A369715 Number of digits of phi (the golden ratio) correctly approximated by Fibonacci(n+1) / Fibonacci(n).
%H A369715 David Consiglio, Jr., <a href="/A369715/b369715.txt">Table of n, a(n) for n = 1..1000</a>
%e A369715 For n=1, 1/1 = 1 matches the first digit of phi (1.618033), so a(1) = 1
%e A369715 For n=2, 2/1 = 2 which matches no digits of phi (1.618033), so a(2) = 0
%e A369715 For n=12,
%e A369715   F(13)/F(12) = 1.6180 55... = 233/144
%e A369715   phi         = 1.6180 33...
%e A369715                 ^ ^^^^    a(12) = 5 matching digits
%o A369715 (Python)
%o A369715 from math import isqrt
%o A369715 fib = [1,1]
%o A369715 terms = []
%o A369715 while len(terms) < 1000:
%o A369715     deg = 0
%o A369715     target = 0
%o A369715     test = 0
%o A369715     while target == test:
%o A369715         target = (10**deg+isqrt(5*10**(2*deg)))//2
%o A369715         test = (10**deg*(fib[-1]))//fib[-2]
%o A369715         deg += 1
%o A369715     terms.append(deg-1)
%o A369715     fib.append(fib[-1]+fib[-2])
%o A369715 print(terms)
%Y A369715 Cf. A000045, A001622, A048433, A048434.
%K A369715 nonn,base
%O A369715 1,4
%A A369715 _David Consiglio, Jr._, Jan 31 2024