OFFSET
1,1
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
Pi = 3.1415926535897932384626...
..................|...||..|.....
_e = 2.7182818284590452353602...
MAPLE
N:= 1000: # to get all terms <= N+1
Fpi:= convert(floor(10^N*Pi), base, 10):
Fe:= convert(floor(10^N*exp(1)), base, 10):
select(t -> Fpi[N+2-t] = Fe[N+2-t], [$2..N+1]); # Robert Israel, Jul 23 2014
MATHEMATICA
ed=RealDigits[N[E, 2000]][[1]]; pd=RealDigits[N[\[Pi], 2000]][[1]]; okQ[n_] := Take[ed, {n}] == Take[pd, {n}]; Select[Range[2000], okQ] (* Harvey P. Dale, Jan 05 2011 *)
Module[{nn=3000, pid, ed}, pid=RealDigits[Pi, 10, nn][[1]]; ed=RealDigits[ E, 10, nn] [[1]]; Flatten[ Position[Transpose[{pid, ed}], {x_, x_}]]] (* Harvey P. Dale, Dec 19 2015 *)
PROG
(PARI) \p 1000
e=Vec(Str(exp(1))); p=Vec(Str(Pi)); for(n=3, #e-9, if(e[n]==p[n], print1(n-1", "))) \\ Jens Kruse Andersen, Jul 23 2014
(Python)
from sympy import E, S
digits = 1000
pi, e = str(S.Pi.n(digits+3)), str(E.n(digits+3))
print([k for k in range(2, digits+1) if pi[k] == e[k]]) # Michael S. Branicky, Apr 29 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Dec 15 1999
EXTENSIONS
More terms from James A. Sellers, Dec 28 1999
STATUS
approved