OFFSET
1,5
COMMENTS
For p(1) = 2, 10^x - 2 is divisible by 2 for all x > 0 so a(1) = 0.
For p(3) = 5, 10^x - 5 is divisible by 5 for all x > 0 so a(3) = 0.
For all prime(i) of the form 3*k+1, 10^x-prime(i) is divisible by 3 so a(i) = 0.
For n = 913, prime(n) = 7127, if x exists then x > 16000.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..912
EXAMPLE
10^1 - 3 = 7 is prime, so a(2) = 1 as 3 = prime(2).
10^1 - 11 is composite, 10^2 - 11 = 89 is prime, so a(5) = 2 as 11 = prime(5).
PROG
(PARI) a(n) = if((p=prime(n))%3==1 || n==1 || n==3, 0, for(x=1, oo, if(ispseudoprime(10^x-p), return(x)))); \\ Jinyuan Wang, Mar 05 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jun 01 2016
STATUS
approved