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.

A276199 Smallest prime that begins with at least n digits of Pi.

Original entry on oeis.org

3, 31, 31469, 314107, 314159, 314159, 314159207, 3141592603, 31415926541, 314159265307, 314159265359, 3141592653581, 314159265358909, 3141592653589711, 31415926535897921, 314159265358979347, 3141592653589793239, 3141592653589793239, 314159265358979323861
Offset: 1

Views

Author

Keywords

Examples

			a(7) = 314159207, begins with first 7 digits of Pi = 3.141592653...
		

Crossrefs

Cf. A005042.

Programs

  • Perl
    use ntheory ":all"; sub a276199 { my $l=shift; my $p="3".substr(Pi($l+20),2,$l-1); for my $dig (0 .. 20) { my $add = "0" x $dig; do { return "$p$add" if is_prime("$p$add"); } while length(++$add) == $dig; } } # Dana Jacobsen, Aug 30 2016