

A198344


Position of the first ndigit prime occurring in the decimal expansion of Pi, A000796.


4



1, 1, 8, 3, 2, 1, 4, 34, 30, 5, 15, 2, 6, 17, 36, 82, 12, 87, 26, 12, 25, 215, 35, 18, 17, 3, 41, 17, 234, 17, 167, 92, 251, 15, 9, 12, 31, 1, 57, 290, 4, 99, 218, 502, 48, 164, 198, 201, 128, 7, 363, 143, 11, 138, 487, 32, 230, 82, 355, 515
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Differs from A104842 in a(22), a(43), a(55),..., because here, leading zeros are not allowed.
The corresponding primes are listed in A104841.
Among the first 99 terms, even though values up to 825 occur, the values 1 and 17 occur 4 times, 12 and 57 occur 3 times, and numbers as large as 82, 164, 167 and 234 occur twice.


LINKS

M. F. Hasler, Table of n, a(n) for n = 1..162


EXAMPLE

a(1)=1 because the initial digit "3" of Pi is prime.
a(2)=a(6)=a(38)=1 because the first 2, 6, and 38 digits of Pi (including the initial 3) also form the primes 31, 314159 and 31415926535897932384626433832795028841, cf. A005042 and A060421.


MATHEMATICA

With[{pd=RealDigits[Pi, 10, 1000][[1]]}, Table[Position[Partition[pd, n, 1], _?(PrimeQ[FromDigits[#]]&&#[[1]]!=0&), {1}, 1, Heads>False], {n, 60}]]// Flatten (* Harvey P. Dale, Apr 25 2016 *)


PROG

(PARI) A198344(n)=for(c=0, 9e9, ispseudoprime(Pi\.1^(n+c1)%10^n)&Pi\.1^c%10&return(c+1)) /* Replace upper limit 9e9 by "default(realprecision)n" to avoid an error message and return 0 in case no ndigit prime is found */


CROSSREFS

Cf. A000796, A272304.
Sequence in context: A176454 A199380 A104842 * A226042 A198843 A119277
Adjacent sequences: A198341 A198342 A198343 * A198345 A198346 A198347


KEYWORD

nonn,base,changed


AUTHOR

M. F. Hasler, Oct 23 2011


STATUS

approved



