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.

A053600 a(1) = 2; for n>=1, a(n+1) is the smallest palindromic prime with a(n) as a central substring.

Original entry on oeis.org

2, 727, 37273, 333727333, 93337273339, 309333727333903, 1830933372733390381, 92183093337273339038129, 3921830933372733390381293, 1333921830933372733390381293331, 18133392183093337273339038129333181
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 20 2000

Keywords

Examples

			As a triangle:
.........2
........727
.......37273
.....333727333
....93337273339
..309333727333903
1830933372733390381
		

References

  • G. L. Honaker, Jr. and Chris K. Caldwell, Palindromic Prime Pyramids, J. Recreational Mathematics, Vol. 30(3) 169-176, 1999-2000.

Crossrefs

Programs

  • Mathematica
    d[n_] := IntegerDigits[n]; t = {x = 2}; Do[i = 1; While[! PrimeQ[y = FromDigits[Flatten[{z = d[i], d[x], Reverse[z]}]]], i++]; AppendTo[t, x = y], {n, 10}]; t (* Jayanta Basu, Jun 24 2013 *)
  • Python
    from gmpy2 import digits, mpz, is_prime
    A053600_list, p = [2], 2
    for _ in range(30):
        m, ps = 1, digits(p)
        s = mpz('1'+ps+'1')
        while not is_prime(s):
            m += 1
            ms = digits(m)
            s = mpz(ms+ps+ms[::-1])
        p = s
        A053600_list.append(int(p)) # Chai Wah Wu, Apr 09 2015