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.

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