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!)
A257460 Let b_k=7...7 consist of k>0 7's. Then a(n) is the smallest k such that the concatenation prime(n)b_k is prime, or a(n)=0 if there is no such prime. 3
2, 1, 2, 0, 3, 1, 2, 1, 2, 48, 1, 10, 2, 3, 3, 3, 9, 1, 1, 2, 66, 1, 2, 8, 1, 2, 6, 3, 1, 3, 1, 2, 3, 6, 8, 9, 7, 1, 3, 2, 2, 3, 17, 4, 2, 1, 3, 1, 2, 1, 3, 2, 1, 5, 17, 5, 8, 16, 1, 3, 1, 8, 6, 2, 1, 3, 3, 2184, 6, 6, 3, 2, 1, 3, 1, 2, 2, 4, 2, 3, 3, 1, 2, 1, 1, 3, 6, 15, 5, 1, 48, 2, 1, 2, 7, 2, 47, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The only unknown terms less than 10000, tested to 17500, are for n: 484, 1291, 2096, 2238, 3503, 3859, 6674, 7087, 7824, 8954.
LINKS
FORMULA
a(n)=k for the least k such that prime(n)*10^k+7*(10^k-1)/9 is prime, where prime(n) is the n-th prime.
MATHEMATICA
f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + 7(10^k - 1)/9], k++]; k]; f[4] = 0; Array[f, 100]
PROG
(PARI) isok(k, dp) = ispseudoprime(fromdigits(concat(dp, vector(k, i, 7))));
a(n) = {if (prime(n) == 7, return(0)); my(k=1, p=prime(n)); while (!ispseudoprime(p*10^k+7*(10^k-1)/9), k++); k; } \\ Michel Marcus, Jan 20 2021
CROSSREFS
Sequence in context: A081733 A102587 A272608 * A339471 A159834 A274576
KEYWORD
nonn,base
AUTHOR
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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)