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.

A167218 Primes whose reversal - 1 is a square.

Original entry on oeis.org

2, 5, 71, 73, 101, 109, 263, 269, 523, 541, 587, 1061, 1063, 2089, 2251, 2273, 2297, 2843, 2861, 5441, 5477, 5483, 6203, 6221, 7129, 7507, 7937, 10009, 10163, 10169, 10487, 10691, 20201, 20693, 22391, 22769, 24023, 24877, 26141, 26171, 26723
Offset: 1

Views

Author

Claudio Meller, Oct 30 2009

Keywords

Comments

The first digit of a(n) cannot be 3, 4, 8 or 9. - Altug Alkan, Dec 20 2015

Examples

			71 is prime and 17-1 = 16 = 4^2.
		

Crossrefs

Cf. A007488.

Programs

  • PARI
    lista(nn) = {forprime(p=2, nn, if (issquare(eval(concat(Vecrev(Str(p))))-1), print1(p, ", ")););} \\ Michel Marcus, Dec 20 2015
  • Python
    from sympy import isprime
    A167218_list, i, j = [], 0, 1
    while j < 10**10:
        p = int(str(j)[::-1])
        if j % 10 and isprime(p):
            A167218_list.append(p)
        j += 2*i+1
        i += 1
    A167218_list = sorted(A167218_list) # Chai Wah Wu, Dec 20 2015