cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

11, 661, 4441, 404040401, 29292929291, 5353535353531, 1291291291291291291291, 81818181818181811, 8888888888888888881, 2532532532532532532532532532531, 2282282282282282282282282282282281, 1201201201201201201201201201201201201, 3813813813813813813813813813813813813811
Offset: 1

Views

Author

Jonathan Vos Post, Feb 09 2013

Keywords

Comments

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.

Examples

			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, ....
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.
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.
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.
		

Crossrefs

Programs

  • Maple
    A211401k := proc(n,k)
        option remember;
        local p,amin;
        if n = 1 then
            amin := 1 ;
        else
            amin := procname(n-1,k)+1 ;
        end if;
        for a from amin do
            [seq(a,i=1..k),1] ;
            p := digcatL(%) ;
            if isprime(p) then
                return a;
            end if;
        end do:
    end proc:
    A211401 := proc(n)
        b := A211401k(n,n) ;
        [seq(b,i=1..n),1] ;
        digcatL(%) ;
    end proc: # R. J. Mathar, Feb 10 2013
  • Mathematica
    Table[Select[Table[10 FromDigits[Flatten[IntegerDigits/@PadRight[{},k,n]]]+1,{n,1000}],PrimeQ][[k]],{k,15}] (* Harvey P. Dale, Oct 13 2022 *)