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!)
A087605 Smallest k such that n times concatenation of k with itself followed by a 7 is a prime, or 0 if no such number exists. 7

%I #7 Dec 05 2013 19:56:32

%S 1,2,1,1,3,100005,1,2,4,6,8,100010,19,2,215,9,60,100041,4,66,5,1,41,

%T 100061,4,15,2,1,195,100055,61,1061,143,12,72,100127,19,60,1,6,125,0,

%U 45,1305,3,39,27,100269,72,95,136,1123,50,100193,52,1056,176,1536,66

%N Smallest k such that n times concatenation of k with itself followed by a 7 is a prime, or 0 if no such number exists.

%C a(42n)=0, but all other terms are probably nonzero. For n a multiple of 42, (10^(l*n)-1)/(10^l-1)*10+7 is divisible by 7 for any l. - _Max Alekseyev_, Feb 11 2005

%F Minimal k such that k*(10^(l*n)-1)/(10^l-1)*10+7 is prime, where l is the length of k; and 0 if no such prime exists. - _Max Alekseyev_, Feb 11 2005

%e a(5) = 3 as 333337 is a prime but 111117 and 222227 are not.

%o (PARI) { a(n) = if(n%42==0,return(0)); for(l=1,10^6, if(valuation(10^(l*n)-1,7)==valuation(10^l-1,7), for(k=10^(l-1),10^l-1, if(isprime(k*(10^(l*n)-1)/(10^l-1)*10+7), return(k) ) ) ) ) } (Alekseyev)

%Y Cf. A086920, A087604, A087606, A087607, A087608, A087609, A087610.

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Sep 18 2003

%E Corrected and extended by _Max Alekseyev_, Feb 11 2005

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 19 06:44 EDT 2024. Contains 371782 sequences. (Running on oeis4.)