login
Positions in Pi, e, and the Golden Ratio indicate a common digit.
1

%I #18 Jan 02 2022 09:48:07

%S 13,100,170,396,500,596,607,694,825,828,841,941,1283,1292,1385,1595,

%T 1706,1743,1906,2021,2061,2154,2258,2303,2360,2368,2508,2547,2558,

%U 2711,2725,2792,2833,2858,3037,3052,3281,3310,3430,3498,3519,3592,3652,3710,3868

%N Positions in Pi, e, and the Golden Ratio indicate a common digit.

%H Harvey P. Dale, <a href="/A266002/b266002.txt">Table of n, a(n) for n = 1..10000</a>

%e The 100th digit of Pi = the 100th digit of e = the 100th digit of the Golden Ratio = 7.

%t Module[{nn=10000,pid,ed,grd},pid=RealDigits[Pi,10,nn][[1]];ed= RealDigits[ E,10,nn][[1]];grd=RealDigits[GoldenRatio,10,nn][[1]];Flatten[ Position[ Transpose[{pid,ed,grd}],{x_,x_,x_}]]]

%o (Python 3.x)

%o from sympy import *

%o #pi, E, phi

%o pi_const = str(N(pi, 10000))

%o e_const = str(N(E, 10000))

%o phi_const = str(S.GoldenRatio.n(10000))

%o for x in range(10000):

%o if pi_const[x] == e_const[x]:

%o if e_const[x] == phi_const[x]:

%o print(x)

%o # _Glen Gilchrist_, Jan 02 2022

%Y Cf. A000796, A001113, A001622, A257492, A257494.

%K nonn,base

%O 1,1

%A _Harvey P. Dale_, Dec 19 2015