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.

A034809 Numbers k such that the concatenation of k and previous_prime(k) is a prime.

Original entry on oeis.org

4, 5, 9, 10, 16, 24, 33, 36, 42, 46, 51, 53, 56, 59, 63, 66, 67, 69, 75, 76, 78, 81, 87, 96, 102, 106, 108, 111, 114, 116, 123, 125, 129, 130, 135, 137, 144, 145, 147, 148, 153, 156, 159, 170, 171, 177, 179, 180, 184, 187, 190, 192, 195, 196, 198, 207, 211, 214
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Examples

			k=156 is a term because the largest prime < 156 is 151 and '156151' is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[250],PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ NextPrime[ #,-1]]]]]&] (* Harvey P. Dale, Jul 10 2017 *)
  • Python
    from sympy import isprime, prevprime
    def ok(n): return isprime(int(str(n) + str(prevprime(n))))
    print(list(filter(ok, range(3, 215)))) # Michael S. Branicky, Apr 05 2021