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.

A381126 Primes that are the concatenation of prime(p) and p where p is a prime.

Original entry on oeis.org

53, 6719, 15737, 587107, 1297211, 1823281, 1913293, 3067439, 3593503, 3943547, 4397599, 5503727, 5651743, 6353827, 6361829, 6823877, 7109911, 7283929, 7523953, 85131061, 85271063, 87611093, 88071097, 104331277, 125031493, 128411531, 130031549, 133311583, 141071663
Offset: 1

Views

Author

Maja Gwozdz, Feb 14 2025

Keywords

Examples

			1297211 is a term since it is prime and is the concatenation of prime(p) = 1297 and p = 211.
		

Crossrefs

Subsequence of A084669.

Programs

  • Maple
    f:= p-> (h-> `if`(andmap(isprime, [p, h]), h, [][]))(parse(cat(ithprime(p), p))):
    map(f, [$1..2000])[];  # Alois P. Heinz, Feb 15 2025
  • PARI
    a381126(limit) = {forprime (p=2, limit, my(pd=digits(p), ppd=digits(prime(p)), pc=fromdigits(concat(ppd,pd))); if(isprime(pc), print1(pc,", ")))};
    a381126(2000) \\ Hugo Pfoertner, Feb 14 2025
  • Python
    from sympy import isprime, primerange, prime
    def a(limit: int) -> list[int]:
        result: list[int] = []
        for p in primerange(2, limit):
            pth_prime = prime(p)
            rc_val = int(f"{pth_prime}{p}")
            if isprime(rc_val):
                result.append(rc_val)
        return result
    print(a(1700))