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.

A052055 Positions in both Pi and e indicate a common digit.

This page as a plain text file.
%I A052055 #31 Jul 02 2025 16:01:58
%S A052055 13,17,18,21,34,40,45,56,59,70,81,95,100,143,170,206,244,263,275,279,
%T A052055 294,324,326,331,334,361,365,388,389,396,412,420,428,429,453,460,461,
%U A052055 462,484,494,500,501,504,507,512,523,526,548,582,591,595,596,599,603
%N A052055 Positions in both Pi and e indicate a common digit.
%H A052055 Jens Kruse Andersen, <a href="/A052055/b052055.txt">Table of n, a(n) for n = 1..10000</a>
%e A052055 Pi = 3.1415926535897932384626...
%e A052055 ..................|...||..|.....
%e A052055 _e = 2.7182818284590452353602...
%p A052055 N:= 1000: # to get all terms <= N+1
%p A052055 Fpi:= convert(floor(10^N*Pi),base,10):
%p A052055 Fe:= convert(floor(10^N*exp(1)),base,10):
%p A052055 select(t -> Fpi[N+2-t] = Fe[N+2-t],[$2..N+1]); # _Robert Israel_, Jul 23 2014
%t A052055 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 *)
%t A052055 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 *)
%o A052055 (PARI) \p 1000
%o A052055 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
%o A052055 (Python)
%o A052055 from sympy import E, S
%o A052055 digits = 1000
%o A052055 pi, e = str(S.Pi.n(digits+3)), str(E.n(digits+3))
%o A052055 print([k for k in range(2, digits+1) if pi[k] == e[k]]) # _Michael S. Branicky_, Apr 29 2023
%Y A052055 Cf. A000796, A001113, A257492, A257494.
%K A052055 nonn,base
%O A052055 1,1
%A A052055 _Patrick De Geest_, Dec 15 1999
%E A052055 More terms from _James Sellers_, Dec 28 1999