login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = n-th prime of the form (k concatenated with k concatenated...) n times concatenated with 1.
1

%I #12 Oct 13 2022 14:39:46

%S 11,661,4441,404040401,29292929291,5353535353531,

%T 1291291291291291291291,81818181818181811,8888888888888888881,

%U 2532532532532532532532532532531,2282282282282282282282282282282281,1201201201201201201201201201201201201,3813813813813813813813813813813813813811

%N a(n) = n-th prime of the form (k concatenated with k concatenated...) n times concatenated with 1.

%C Main diagonal A[n,n] of array A[k,n] = n-th prime of the form (j concatenated with j concatenated...) k times concatenated with 1.

%e a(1) = 11 because that is the 1st (smallest) prime of the form Concatenate(1 copy of k) with 1, for k = 1, 2, 3, ....

%e a(2) = 661 because the 1st (smallest) prime of the form Concatenate(2 copies of k) with 1, for k = 1, 2, 3, .... is 331, and the 2nd is 661.

%e a(3) = 4441 because the 1st (smallest) prime of the form Concatenate(3 copies of k) with 1, for k = 1, 2, 3, .... is 2221, the 2nd is 3331, and the 3rd is 4441.

%e a(4) = 404040401 because the 1st (smallest) prime of the form Concatenate(4 copies of k) with 1, for k = 1, 2, 3, .... is 33331, the 2nd is 99991, the 3rd is 242424241, and the 4th is 404040401.

%p A211401k := proc(n,k)

%p option remember;

%p local p,amin;

%p if n = 1 then

%p amin := 1 ;

%p else

%p amin := procname(n-1,k)+1 ;

%p end if;

%p for a from amin do

%p [seq(a,i=1..k),1] ;

%p p := digcatL(%) ;

%p if isprime(p) then

%p return a;

%p end if;

%p end do:

%p end proc:

%p A211401 := proc(n)

%p b := A211401k(n,n) ;

%p [seq(b,i=1..n),1] ;

%p digcatL(%) ;

%p end proc: # _R. J. Mathar_, Feb 10 2013

%t Table[Select[Table[10 FromDigits[Flatten[IntegerDigits/@PadRight[{},k,n]]]+1,{n,1000}],PrimeQ][[k]],{k,15}] (* _Harvey P. Dale_, Oct 13 2022 *)

%Y Cf. A030430, A210511, A210712, A210720.

%K nonn,easy,base

%O 1,1

%A _Jonathan Vos Post_, Feb 09 2013