

A083747


Smallest number m such that n followed by m ones yields a prime; a(p) = 0 because 0 ones are necessary to yield a prime.


3



1, 0, 0, 1, 0, 1, 0, 2, 2, 1, 0, 136, 0, 9, 1, 3, 0, 1, 0, 2, 1, 3, 0, 1, 1, 3, 1, 1, 0, 2, 0, 35, 1, 6, 2, 4, 0, 1, 2, 1, 0, 1, 0, 3, 772, 1, 0, 5, 1, 2, 4, 1, 0, 1, 31, 18470, 1, 3, 0, 1, 0, 2, 1, 1, 3, 1, 0, 3, 1, 1, 0, 2, 0, 2, 1, 1, 9, 4, 0, 2, 1, 1, 0, 5, 6, 3, 149, 1, 0, 2, 1, 3, 2, 1, 2, 7, 0, 2, 1, 10, 0, 1, 0, 44, 1, 1, 0, 5, 0, 17, 16, 3, 0, 2, 1, 9, 1, 1, 5, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,8


COMMENTS

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 3PRP.
Number of times 1 has to be repeatedly appended to n to form a prime.  Lekraj Beedassy, Jun 01 2006


LINKS

Table of n, a(n) for n=1..120.
Jon Perry, Wilde Primes.


EXAMPLE

a(8)=2 because 8 and 81 are composite but 811 is prime.


PROG

(PARI) { aop(n) = local(c, k, stop); c=0; k=n; stop=500; if(isprime(n), return(0)); while(!isprime(k) && c<stop, k=k*10+1; c++); if(c<stop, return(c), return(1)); }


CROSSREFS

Cf. A069568.
Sequence in context: A266318 A011265 A265863 * A246271 A049334 A054924
Adjacent sequences: A083744 A083745 A083746 * A083748 A083749 A083750


KEYWORD

base,sign


AUTHOR

Jason Earls, Jun 16 2003


STATUS

approved



