|
| |
|
|
A069568
|
|
a(n) = smallest number m > 0 such that n followed by m 1's yields a prime, or -1 if no such m exists.
|
|
2
|
|
|
|
1, 2, 1, 1, 5, 1, 1, 2, 2, 1, 17, 136, 1, 9, 1, 3, 8, 1, 1, 2, 1, 3, 2, 1, 1, 3, 1, 1, 6, 2, 1, 35, 1, 6, 2, 4, -1, -1, 2, 1, 2, 1, 1, 3, 772, 1, 3, 5, 1, 2, 4, 1, 9, 1, 31, 18470, 1, 3, 18, 1, 4, 2, 1, 1, 3, 1, 210, 3, 1, 1, 6, 2, 7, 2, 1, 1, 9, 4, 3, 2, 1, 1, 2, 5, 6, 3, 149, 1, 6, 2, 1, 3, 2, 1, 2, 7, 1, 2, 1, 10, 2, 1, 1, 44, 1, 1, 2, 5, 1, 17, 16, 3, 2, 2, 1, 9, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,2
|
|
|
COMMENTS
|
There are infinitely many values of n for which no such m exists. For example, every number in the sequence 13531, 135311, 1353111, 13531111, ..., is divisible by 3, 7, 11, or 13, so a(1353) does not exist. The same is true for 1353 + 3003k for k = 1, 2, 3, .... These are not the only examples. I do not know whether 1353 is the smallest example. - Gerry Myerson, Feb 12 2003
Terms from Robert G. Wilson v.
a(37)=a(38)=-1 means no prime has yet been found; a(176)= -1 because it has been proved never to reach a prime. a(45)= 772 and a(56)= 18470 found by Richard Heylen; a(45) has been proved prime while a(56) is 3-PRP. - Jason Earls, Jun 16 2003
a(37) = -1 because 37 followed by any positive number, m say, of 1's is divisible by at least one of the primes {7,3,37,13}. Proof: 371 is divisible by 7, as is 111111, so this covers m = 1 mod 6 1's. 3711 is divisible by 3, as is 111, so this covers m = 2 mod 3 1's. 37111 is divisible by 37, as is 111, so this covers m = 0 mod 3 1's. 371111 is divisible by 13, as is 111111, so this covers m = 4 mod 6 1's and the proof is complete. - Ray Chandler, Mar 31 2004
a(38) = -1 because 38 followed by any positive number, m say, of 1's is divisible by 3 or 37 or by (7*10^k-1)/3 if m = 3k. Proof: 381 is divisible 3, as is 111, so this covers 1 mod 3 1's. 3811 is divisible by 37, as is 111, so this covers 2 mod 3 1's. The terms remaining are 38111, 38111111, etc. so the general form is 38*10^(3k)+(10^(3k)-1)/9. This is the same as (343*10^(3k)-1)/9 = ((7*10^k)^3-1)/9 which has integer factors (7*10^k-1)/3 and ((7*10^k)^2 + 7*10^k +1)/3 and can't be prime, so this covers 0 mod 3 1's and the proof is complete. - Ray Chandler, Mar 31 2004
|
|
|
LINKS
|
Table of n, a(n) for n=1..118.
Lenny Jones, When does appending the same digit repeatedly on the right of a positive integer generate a sequence of composite numbers?, Amer. Math. Monthly, 118 (2011), 153-160.
Jon Perry, Wilde Primes. [Broken link]
|
|
|
EXAMPLE
|
a(5) = 5 as the smallest prime of the type 5 followed by 1's is 511111 (though 5 itself is a prime).
|
|
|
MATHEMATICA
|
Do[k = 1; While[ !PrimeQ[ ToExpression[ StringJoin[ ToString[n], ToString[(10^k - 1)/9]]]], k++ ]; Print[k], {n, 1, 100}] (* Robert G. Wilson v *)
|
|
|
PROG
|
(PARI) { aopo(n) = local(c, k, stop); c=1; k=n; stop=500; k=k*10+1; while(!isprime(k) && c<stop, k=k*10+1; c++); if(c<stop, return(c), return(-1)); }
|
|
|
CROSSREFS
|
Sequence in context: A110243 A169950 A088347 * A210545 A141323 A210876
Adjacent sequences: A069565 A069566 A069567 * A069569 A069570 A069571
|
|
|
KEYWORD
|
sign,base
|
|
|
AUTHOR
|
Amarnath Murthy, Mar 24 2002
|
|
|
EXTENSIONS
|
More terms from Jason Earls, Jun 16 2003
|
|
|
STATUS
|
approved
|
| |
|
|