login
Primes p such that the p-th digit in the decimal expansion of Pi is 2.
3

%I #10 Jul 29 2024 05:26:49

%S 7,17,29,103,113,137,281,293,457,463,547,601,631,823,1051,1091,1109,

%T 1201,1231,1283,1301,1327,1399,1427,1447,1487,1523,1621,1663,1733,

%U 1847,1907,1949,2099,2141,2281,2297,2309,2377,2767,3023,3037,3119,3121,3391,3457

%N Primes p such that the p-th digit in the decimal expansion of Pi is 2.

%e In the decimal digits of Pi = 3.14159265... the first 2 occurs as the 7th digit, and 7 is prime; therefore a(1) = 7.

%o (PARI) pizeros(n,d) = { default(realprecision,5000); p = Pi; v = Vec(Str(p)); for(x=1,n, if(v[x] == Str(d) && isprime(x-1),print1(x-1",")) ) }

%o (PARI) A088566_upto(N=3456, d=2)={localprec(N+20); [p|p<-primes([1, #N=digits(Pi\10^-N)]), N[p]==d]} \\ _M. F. Hasler_, Jul 28 2024

%Y Primes in A053746.

%Y Cf. A088563 (similar for digits 0), A088565 (for digits 1),

%Y Cf. A000796 (decimal digits of Pi).

%K nonn,base

%O 1,1

%A _Cino Hilliard_, Nov 19 2003