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.

A137443 First n-digit prime in consecutive digits of e.

This page as a plain text file.
%I A137443 #16 Feb 16 2025 08:33:07
%S A137443 7,71,281,4523,74713,904523,6028747,72407663,360287471,7427466391,
%T A137443 75724709369,749669676277,8284590452353,99959574966967,
%U A137443 724709369995957,2470936999595749,28459045235360287,571382178525166427
%N A137443 First n-digit prime in consecutive digits of e.
%C A137443 If the "2" at the beginning of e is included, the only values for n <= 1000 that change are a(1) = 2, a(3) = 271 and a(85) = 2718281828459045235360287471352662497757247093699959574966967627724076630353547594571.
%C A137443 For another version starting with 2 see A095935. - _Omar E. Pol_, Oct 24 2011
%H A137443 Dan Drake, <a href="/A137443/b137443.txt">Table of n, a(n) for n = 1..1000</a>
%H A137443 Pegg, E. Jr. and Weisstein, E. W. <a href="https://mathworld.wolfram.com/news/2004-10-13/google/">Mathematica's Google Aptitude</a>. MathWorld Headline news, Oct 13, 2004.
%e A137443 7427466391 is the first 10-digit prime found in consecutive digits of e, so a(10) = 7427466391.
%o A137443 (Sage)
%o A137443 def a(digits):
%o A137443     bits = 0
%o A137443     pos = 0
%o A137443     while True:
%o A137443         bits += (digits * 4) + 50
%o A137443         decimals = RealField(bits, rnd='RNDZ')(exp(1)).frac().str()[2:]
%o A137443         for s in range(pos, len(decimals) - digits + 1):
%o A137443             if decimals[s] != '0':
%o A137443                 i = Integer(decimals[s:s+digits])
%o A137443                 if i.is_prime():
%o A137443                     return i
%o A137443         pos = len(decimals) - digits + 1
%Y A137443 Cf. A095926.
%Y A137443 Cf. A001113, A095935. - _Omar E. Pol_, Oct 24 2011
%K A137443 base,nonn
%O A137443 1,1
%A A137443 _Dan Drake_, Apr 18 2008