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.

A373349 Twin primes where both the prime and its twin have prime reversals.

Original entry on oeis.org

3, 5, 7, 11, 13, 71, 73, 149, 151, 179, 181, 311, 313, 1031, 1033, 1151, 1153, 1229, 1231, 3299, 3301, 3371, 3373, 3389, 3391, 3467, 3469, 3851, 3853, 7457, 7459, 7949, 7951, 9011, 9013, 9437, 9439, 10007, 10009, 10067, 10069, 10457, 10459, 10499, 10501, 10889
Offset: 1

Views

Author

Thomas Otten, Jun 01 2024

Keywords

Crossrefs

Programs

  • Maple
    R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
    q:= p-> andmap(isprime, [p, R(p)]) and ormap(
        t-> andmap(isprime, [p+t, R(p+t)]), [-2, +2]):
    select(q, [$2..12000])[];  # Alois P. Heinz, Jun 06 2024
  • PARI
    isrevp(p) = isprime(p) && isprime(fromdigits(Vecrev(digits(p))));
    isok(p) = isprime(p) && ((isprime(p+2) && isrevp(p+2)) || (isprime(p-2) &&  isrevp(p-2))) && isrevp(p); \\ Michel Marcus, Jun 06 2024