%I #16 Aug 15 2015 11:51:28
%S 111,11111,1111111,11111111111,1111111111111,11111111111111111,
%T 11111111111111111111111111111,1111111111111111111111111111111,
%U 1111111111111111111111111111111111111,11111111111111111111111111111111111111111,1111111111111111111111111111111111111111111
%N Composite repunits with a prime number of 1's.
%H Alois P. Heinz, <a href="/A259102/b259102.txt">Table of n, a(n) for n = 1..164</a>
%H R. Ondrejka, <a href="/A000522/a000522.pdf">Letter to N. J. A. Sloane, May 15 1976</a>
%p 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
%p # second Maple program:
%p r:= n-> (10^n-1)/9:
%p b:= proc(n) option remember; local p;
%p p:=`if`(n=1, 1, b(n-1));
%p do p:= nextprime(p);
%p if not isprime(r(p)) then return p fi
%p od
%p end:
%p a:= n-> r(b(n)):
%p seq(a(n), n=1..15); # _Alois P. Heinz_, Jun 25 2015
%Y Cf. A002275, A004022, A004023, A031974, A179005.
%K nonn,base
%O 1,1
%A _N. J. A. Sloane_, Jun 23 2015