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
1, 2, 1, 1, 3, 100005, 1, 2, 4, 6, 8, 100010, 19, 2, 215, 9, 60, 100041, 4, 66, 5, 1, 41, 100061, 4, 15, 2, 1, 195, 100055, 61, 1061, 143, 12, 72, 100127, 19, 60, 1, 6, 125, 0, 45, 1305, 3, 39, 27, 100269, 72, 95, 136, 1123, 50, 100193, 52, 1056, 176, 1536, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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
LINKS
FORMULA
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
EXAMPLE
a(5) = 3 as 333337 is a prime but 111117 and 222227 are not.
PROG
(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)
CROSSREFS
Sequence in context: A247518 A078076 A010247 * A251636 A248939 A106246
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 18 2003
EXTENSIONS
Corrected and extended by Max Alekseyev, Feb 11 2005
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 March 5 03:04 EST 2024. Contains 370537 sequences. (Running on oeis4.)