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.

Showing 1-2 of 2 results.

A210720 Primes formed by concatenating n, n, n, n, and 1 for n = 1, 2, 3,....

Original entry on oeis.org

33331, 99991, 242424241, 404040401, 454545451, 464646461, 494949491, 525252521, 575757571, 737373731, 787878781, 949494941, 1021021021021, 1081081081081, 1091091091091, 1211211211211, 1291291291291, 1481481481481, 1511511511511
Offset: 1

Views

Author

Jonathan Vos Post, Jan 29 2013

Keywords

Comments

This is to four (duplicated strings concatenated) as A210712 is to three (duplicated strings concatenated), and as A210511 is to two (duplicated strings concatenated).

Examples

			a(1) = 33331 because Concat(3,3,3,1) = 3331 which is in A000040.
		

Crossrefs

Programs

  • Magma
    [nnnn1: n in [1..200] | IsPrime(nnnn1) where nnnn1 is Seqint([1] cat Intseq(n) cat Intseq(n) cat Intseq(n) cat Intseq(n))]; // Vincenzo Librandi, Mar 15 2013
  • Maple
    A210720 := proc(n)
            local p;
            [n,n,n,n,1] ;
            p := digcatL(%) ;
            if isprime(p) then
                    printf("%d,",p) ;
            end if;
    end proc:
    for n from 1 to 400 do
            A210720(n) ;
    end do: # R. J. Mathar, Feb 10 2013
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], IntegerDigits[n], IntegerDigits[n], IntegerDigits[1], {}}]], {n, 200}], PrimeQ] (* Vincenzo Librandi, Mar 15 2013 *)
    Select[Table[FromDigits[Join[Flatten[IntegerDigits/@PadRight[{},4,n]],{1}]],{n,200}],PrimeQ] (* Harvey P. Dale, Oct 16 2017 *)

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 *)
Showing 1-2 of 2 results.