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-7 of 7 results.

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

Original entry on oeis.org

2221, 3331, 4441, 6661, 1212121, 1616161, 2323231, 2424241, 2828281, 3131311, 3232321, 3333331, 3636361, 3838381, 4040401, 4242421, 4545451, 5454541, 5858581, 6262621, 6868681, 6969691, 7171711, 7272721, 8282821, 9090901, 9999991, 1161161161
Offset: 1

Views

Author

Jonathan Vos Post, Jan 29 2013

Keywords

Comments

This is to three (duplicated strings concatenated) as A210511 is to two (duplicated strings concatenated).

Examples

			a(1) = 2221 because "2" concatenated with "2" concatenated with "2" concatenated with "1" = 2221, which is prime.
9393931 is not in the sequence, even though formed by concatenating n, n, n, and 1 for n = 93, because 9393931 = 211^3 is composite.
		

Crossrefs

Cf. A210511.

Programs

  • Magma
    [nnn1: n in [1..120] | IsPrime(nnn1) where nnn1 is Seqint([1] cat Intseq(n) cat Intseq(n) cat Intseq(n))]; // Bruno Berselli, Jan 30 2013
    
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], IntegerDigits[n], IntegerDigits[1],{}}]], {n, 1000}], PrimeQ] (* Vincenzo Librandi, Mar 13 2013 *)
    Select[FromDigits/@Table[Flatten[IntegerDigits/@PadLeft[{1},4,n]],{n,120}],PrimeQ] (* Harvey P. Dale, May 12 2015 *)
  • PARI
    a(n) = { my(p=Str(prime(n))); eval(concat(concat(concat(p,p),p),1)); } /* Joerg Arndt, Mar 14 2013 */

A210512 Primes formed by concatenating k, k and 3 for k >= 1.

Original entry on oeis.org

113, 223, 443, 773, 883, 10103, 11113, 14143, 25253, 26263, 28283, 32323, 35353, 41413, 50503, 61613, 68683, 71713, 77773, 80803, 83833, 85853, 88883, 97973, 1001003, 1011013, 1101103, 1131133, 1161163, 1181183, 1221223, 1241243, 1281283, 1331333, 1361363, 1391393
Offset: 1

Views

Author

Abhiram R Devesh, Jan 26 2013

Keywords

Comments

This sequence is similar to A030458, A052089 and A210511.
k must not be a multiple of 3, otherwise the concatenation of k, k and 3 will also be a multiple of 3 and therefore not prime. This is a necessary but not sufficient condition.
Some of the terms can be found with this simple process: 5 - 3 = 2 = 1 + 1 giving 113; 7 - 3 = 4 = 2 + 2 giving 223; 11 - 3 = 8 = 4 + 4 giving 443; 17 - 3 = 14 = 7 + 7 giving 773; 19 - 3 = 16 = 8 + 8 giving 883. - J. M. Bergot, Jul 25 2022

Crossrefs

Programs

  • Magma
    [nn3: n in [1..140] | IsPrime(nn3) where nn3 is Seqint([3] cat Intseq(n) cat Intseq(n))]; // Bruno Berselli, Jan 30 2013
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], {3}}]], {n, 100}], PrimeQ] (* Alonso del Arte, Jan 27 2013 *)
  • Python
    import numpy as np
    from functools import reduce
    def factors(n):
        return reduce(list._add_, ([i, n//i] for i in range(1, int(n**0.5) +1) if n % i == 0))
    for i in range(1, 1000):
        p1=int(str(i)+str(i)+"3")
        if len(factors(p1))<3:
            print(p1, end=',')
    
  • Python
    from sympy import isprime
    def xf(n): return int(str(n)*2+'3')
    def ok(n): return isprime(xf(n))
    print(list(map(xf, filter(ok, range(1, 140))))) # Michael S. Branicky, May 21 2021
    

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 *)

A210515 Numbers N such that concatenation of N, N, and x generates a prime for x=1 and x=3 and x=7 and x=9.

Original entry on oeis.org

1235, 4061, 8255, 22775, 24665, 36500, 44501, 52343, 54434, 57644, 58109, 59567, 59588, 65018, 69407, 71789, 78689, 94280, 98594, 106748, 114272, 122504, 134369, 137129, 138905, 144302, 162236, 196439, 235808, 238235, 269912, 277919, 278633, 282461, 290534
Offset: 1

Views

Author

Abhiram R Devesh, Jan 26 2013

Keywords

Comments

The primes generated are part of the sequences A210511, A210512, A210513 and A210514.
There are no terms N with d = 3, 9, 15, 21, ... decimal digits since in those cases (10^(d+1)+10) is divisible by 7. - Michael S. Branicky, Apr 28 2025

Crossrefs

Programs

  • Mathematica
    Select[Range[3*10^5],AllTrue[FromDigits/@Table[Join[IntegerDigits[#],IntegerDigits [#],{n}],{n,{1,3,7,9}}],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 07 2021 *)
  • Python
    import numpy as np
    from functools import reduce
    def factors(n):
        return reduce(list._add_, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
    for i in range(1,50000):
        p1=int(str(i)+str(i)+"1")
        p3=int(str(i)+str(i)+"3")
        p7=int(str(i)+str(i)+"7")
        p9=int(str(i)+str(i)+"9")
        if len(factors(p1))<3 and len(factors(p3))<3 and len(factors(p7))<3 and len(factors(p9))<3:
            print(i, end=',')
    
  • Python
    from gmpy2 import is_prime
    def ok(n):
        b = n*(10**len(str(n))+1)*10
        return all(is_prime(b+x) for x in [1, 3, 7, 9])
    print([N for N in range(3*10**5) if ok(N)]) # Michael S. Branicky, Apr 28 2025

A210534 Primes formed by concatenating palindromes having even number of digits with 1.

Original entry on oeis.org

331, 661, 881, 991, 12211, 14411, 15511, 20021, 21121, 23321, 24421, 29921, 33331, 35531, 41141, 45541, 47741, 50051, 51151, 57751, 59951, 63361, 71171, 72271, 74471, 75571, 81181, 84481, 99991, 1022011, 1255211, 1299211, 1311311, 1344311, 1355311
Offset: 1

Views

Author

Jonathan Vos Post, Jan 30 2013

Keywords

Comments

Analogous to A210511, except that the second n is digit reversed. If the first (leftmost) n were reversed, we would have problems with trailing zeros becoming leading zeros, which get removed in OEIS formatting. That is a slightly different sequence is given by the formula primes of the form n concatenated with A004086(n) concatenated with "1"; or Primes of form a(n) = (n*10^A055642(n)+A004086(n)) concatenated with "1".
There are 190 terms up to all 6-digit palindromes (i.e., 7-digit primes), 1452 terms up to all 8-digit palindromes (i.e., 9-digit primes), and 11724 terms up to all 10-digit palindromes (i.e., 11-digit primes). - Harvey P. Dale, Jul 06 2018

Examples

			a(18) = 50 concatenated with R(50)=05 concatenated with "1" = 50051, which is prime.
		

Crossrefs

Programs

  • Maple
    fulldigRev := proc(n)
        local digs ;
        digs := convert(n,base,10) ;
        [op(ListTools[Reverse](digs)),op(digs)] ;
    end proc:
    for n from 1 to 150 do
        r := [1,op(fulldigRev(n))] ;
        p := add(op(i,r)*10^(i-1),i=1..nops(r)) ;
        if isprime(p) then
            printf("%d,",p);
        end if;
    end do: # R. J. Mathar, Feb 21 2013
  • Mathematica
    10#+1&/@Select[Table[FromDigits[Join[IntegerDigits[n],Reverse[ IntegerDigits[ n]]]],{n,9999}],PrimeQ[10#+1]&](* Harvey P. Dale, Jul 06 2018 *)
    10#+1&/@Select[Flatten[Table[Range[10^n,10^(n+1)],{n,1,5,2}]], PalindromeQ[ #] && PrimeQ[10#+1]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 11 2019 *)

A210711 Semiprimes formed by concatenating n, n, and 1 for n = 1, 2, 3,....

Original entry on oeis.org

111, 221, 551, 771, 11111, 14141, 15151, 16161, 19191, 23231, 24241, 29291, 30301, 34341, 36361, 37371, 38381, 39391, 42421, 44441, 47471, 50501, 53531, 55551, 56561, 59591, 62621, 68681, 70701, 74741, 75751, 77771, 79791, 81811, 83831, 84841, 87871, 91911, 95951, 96961, 1001001
Offset: 1

Views

Author

Jonathan Vos Post, Jan 29 2013

Keywords

Comments

This is to A210511 as semiprimes A001358 are to primes A000040.

Examples

			a(1) = 11 because 111 = 3 * 37.
a(2) = 221 because 221 = 13 * 17.
331 is not in the sequence, because it is a prime.
a(5) = 11111 because "11" concatenated with "11" concatenated with "1" = 11111 = 41 * 271.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func;
    [nn1: n in [1..100] | IsSemiprime(nn1) where nn1 is Seqint([1] cat Intseq(n) cat Intseq(n))]; // Bruno Berselli, Jan 30 2013
  • Maple
    read("transforms"):
    for n from 1 to 100 do
        L := [n,n,1] ;
        p := digcatL(L) ;
        if numtheory[bigomega](p) = 2 then
            print(p) ;
        end if;
    end do: # R. J. Mathar, Jan 30 2013

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-7 of 7 results.