A186208 The first n-digit prime in the decimal expansion of 1/e.
3, 67, 367, 7879, 36787, 367879, 8794411, 21595523, 867445811, 2159552377, 23215955237, 794411714423, 9441171442321, 57147274345919, 767834507836801, 4581113103176783, 67834507836801697, 595523770161460867, 3176783450783680169
Offset: 1
Links
- Matthew House, Table of n, a(n) for n = 1..996
Programs
-
Maple
Digits := 10000: p0 := evalf(1/exp(1))*10:for d from 1 to 20 do: id:=0:for i from 0 to 50000 while(id=0) do :q0:=trunc(p0*10^(i+d-1)): x:= irem(q0,10^d): if type(x,prime)=true and length(x)=d then printf(`%d, `,x):id:=1: else fi:od:od:
-
Mathematica
With[{x=RealDigits[1/E,10,1000][[1]]},Table[FromDigits[ First[ Select[ Partition[x,n,1],PrimeQ[FromDigits[#]]&]]],{n,20}]] (* Harvey P. Dale, Feb 17 2011 *)
Comments