A242973 Positions in both e and Pi where both digits in the same position are prime.
1, 5, 9, 16, 17, 18, 25, 29, 30, 34, 40, 54, 64, 65, 74, 77, 84, 90, 92, 94, 100, 103, 112, 115, 124, 132, 136, 137, 138, 143, 144, 159, 178, 179, 180, 195, 204, 211, 217, 236, 242, 253, 275, 283, 286, 293, 302, 303, 305, 307, 317, 321, 326, 334, 339, 344, 347
Offset: 1
Examples
Pi = 3.1415926535897932384626... .....|....|...|......|||........ _e = 2.7182818284590452353602...
Links
- Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Module[{digs=350,p,e,th},p=RealDigits[Pi,10,digs][[1]];e=RealDigits[E,10,digs][[1]];th = Thread[{p,e}];Position[If[AllTrue[#,PrimeQ],1,0]&/@th,1]]//Flatten (* Harvey P. Dale, Jan 28 2023 *)
-
PARI
\p 1000 e=Vec(Str(exp(1)/10)); p=Vec(Str(Pi/10)); for(n=1, #e-9, if(isprime(eval(e[n+2])) && isprime(eval(p[n+2])), print1(n", "))) \\ Jens Kruse Andersen, Jul 23 2014
Extensions
Definition clarified by Harvey P. Dale, Jan 28 2023
Comments