login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A052055
Positions in both Pi and e indicate a common digit.
6
13, 17, 18, 21, 34, 40, 45, 56, 59, 70, 81, 95, 100, 143, 170, 206, 244, 263, 275, 279, 294, 324, 326, 331, 334, 361, 365, 388, 389, 396, 412, 420, 428, 429, 453, 460, 461, 462, 484, 494, 500, 501, 504, 507, 512, 523, 526, 548, 582, 591, 595, 596, 599, 603
OFFSET
1,1
LINKS
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