login
A034809
Numbers k such that the concatenation of k and previous_prime(k) is a prime.
4
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,1
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..10000 (first 1001 terms from Harvey P. Dale)
EXAMPLE
k=156 is a term because the largest prime < 156 is 151 and '156151' is a prime.
MATHEMATICA
Select[Range[250], PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ NextPrime[ #, -1]]]]]&] (* Harvey P. Dale, Jul 10 2017 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Oct 15 1998
STATUS
approved