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!)
A273846 Smallest x > 0 such that 10^x - prime(n) is a prime number or 0 if no such prime exists. 1
0, 1, 0, 0, 2, 0, 2, 0, 3, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 2, 0, 0, 2, 2, 0, 12, 0, 9, 0, 3, 0, 22, 3, 0, 4, 0, 0, 0, 4, 3, 3, 0, 3, 0, 4, 0, 0, 0, 3, 0, 4, 3, 0, 4, 3, 18, 11, 0, 0, 3, 0, 5, 0, 4, 0, 3, 0, 0, 3, 0, 3, 3, 0, 0, 0, 3, 5, 0, 3, 0, 5, 0, 3, 0 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A029188 A317844 A318447 * A090290 A153585 A169611
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jun 01 2016
STATUS
approved

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 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)