login
A259102
Composite repunits with a prime number of 1's.
2
111, 11111, 1111111, 11111111111, 1111111111111, 11111111111111111, 11111111111111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111, 11111111111111111111111111111111111111111, 1111111111111111111111111111111111111111111
OFFSET
1,1
MAPLE
f:=n->(10^n-1)/9; [f(3), f(5), f(7), f(11), f(13), f(17), f(29), f(31), f(37), f(41), f(43), f(47)]; # cf. A004023
# second Maple program:
r:= n-> (10^n-1)/9:
b:= proc(n) option remember; local p;
p:=`if`(n=1, 1, b(n-1));
do p:= nextprime(p);
if not isprime(r(p)) then return p fi
od
end:
a:= n-> r(b(n)):
seq(a(n), n=1..15); # Alois P. Heinz, Jun 25 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 23 2015
STATUS
approved