A117431 String n is at position n in decimal digits of golden ratio (phi).
1, 20, 62, 9956
Offset: 1
Examples
1 is a term because the first digit in the golden ratio phi is 1. (phi = 1.6180339887498948482045 ...)
Links
- Eric Weisstein's World of Mathematics, The Golden Ratio
Programs
-
Mathematica
StringFinder[m_] := Module[{cc = 10^m + m, sol, aa}, sol = Partition[RealDigits[(1+Sqrt[5])/2, 10, cc] // First, m, 1]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i,Length[sol]}];] (* Example: StringFinder[2] produces all 2-digit members of the sequence. *)
-
Python
from sympy import S def aupto(nn): phistr = str(S.GoldenRatio.n(nn+len(str(nn))+1)).replace(".", "")[:-1] for n in range(1, nn+1): nstr = str(n) if phistr[n-1:n-1+len(nstr)] == nstr: print(n, end=", ") aupto(10**5) # Michael S. Branicky, Jan 20 2021
Comments