login
A112733
Smallest prime of the form 1 followed by n copies of k.
1
11, 199, 1777, 137373737, 199999, 1131313131313, 19999999, 14747474747474747, 1777777777, 113131313131313131313, 11111111111111111111111, 1171717171717171717171717, 17777777777777, 18787878787878787878787878787, 1333333333333333
OFFSET
1,1
EXAMPLE
a(3) = 1777 1 followed by three copies of 7. 1111 and 1333 are composite.
a(4) = 137373737 is 1 followed by four copies of 37.
PROG
(PARI) makestring(n, k) = {d = digits(k); v = vector(n*#d+1); v[1] = 1; ipos = 2; for (i=1, n, for (j=1, #d, v[ipos] = d[j]; ipos++; ); ); s = ""; for (i=1, #v, s = concat(s, v[i])); eval(s); }
a(n) = {k = 1; while (! isprime(v=makestring(n, k)), k++); v; } \\ Michel Marcus, Nov 12 2013
CROSSREFS
Cf. A231605 (k for each n).
Sequence in context: A034831 A142362 A140534 * A088295 A305316 A352842
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jan 02 2006
EXTENSIONS
More terms from Jon E. Schoenfield, May 27 2010
a(15) from Arkadiusz Wesolowski, Nov 12 2013
STATUS
approved