login
A371224
Least prime factor of the integer formed by the first n decimal digits of Pi, or 0 if that number is prime.
0
0, 0, 2, 3, 5, 0, 2, 2, 3, 3, 5, 2, 13, 163, 43, 13, 2, 317213509, 2, 2, 2, 2, 2, 2, 83, 41, 2, 3, 2, 3, 3, 5, 2, 2, 2, 2, 2, 0, 13, 59, 3, 2, 3, 3, 3, 3, 3, 31, 3, 1657, 2, 3, 2, 2, 2, 29, 13, 2, 3, 2, 2, 5, 2828293681646068747, 2, 3, 2, 223, 2, 7
OFFSET
1,3
COMMENTS
Complementary to the sequences A005042 (primes in the initial digits of Pi) and A060421 which lists numbers N such that the first N digits of Pi form a prime - exactly the indices of zeros in the present sequence.
FORMULA
a(n) = 0 <=> n is in A060421 <=> A011545(n-1) is in A000040 (primes).
a(n) = A089281(n) = A020639(A011545(n-1)) whenever a(n) is nonzero.
a(n) = 2 <=> A000796(2-n) is even <=> A011545(n-1) is even.
PROG
(PARI) a(n, c=Pi)={ if( n>=precision(c), error("insufficient precision"), !ispseudoprime(c\10^-n--), factor(c\.1^n)[1, 1]), 0)}
CROSSREFS
Cf. A000796 (decimals of Pi), A005042 (primes in A011545), A011545 (integer made of n+1 initial digits of Pi), A060421 (length of A005042(n)), A020639 (smallest prime factor of n), A000040 (primes), A089281 (smallest prime factor of A011545(n)).
Sequence in context: A024595 A144804 A118308 * A284214 A174548 A068909
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Mar 15 2024
STATUS
approved