login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276199 Smallest prime that begins with at least n digits of Pi. 1

%I #14 Aug 31 2016 09:12:40

%S 3,31,31469,314107,314159,314159,314159207,3141592603,31415926541,

%T 314159265307,314159265359,3141592653581,314159265358909,

%U 3141592653589711,31415926535897921,314159265358979347,3141592653589793239,3141592653589793239,314159265358979323861

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

%H Dana Jacobsen, <a href="/A276199/b276199.txt">Table of n, a(n) for n = 1..997</a> (first 28 terms from José Eduardo Gaboardi de Carvalho)

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

%o (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

%Y Cf. A005042.

%K nonn,base

%O 1,1

%A _José Eduardo Gaboardi de Carvalho_, Aug 24 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)