OFFSET
1,1
COMMENTS
Motivated by sequence A068660 which lists these primes.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
11 is in the sequence because 111211 is prime.
13 is in the sequence because 131413 is prime.
15 is not in the sequence because 151615 = 5 * 30323.
MATHEMATICA
Select[Range[800], PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[# + 1], IntegerDigits[#]]]] &] (* Alonso del Arte, Nov 25 2015 *)
PROG
(PARI) is(n)=isprime(eval(Str(n, n+1, n)))
(Magma) [n: n in [1..700] | IsPrime(Seqint(Intseq(n) cat Intseq(n+1) cat Intseq(n)))]; // Vincenzo Librandi, Nov 30 2015
(Python)
from sympy import isprime
def aupto(N):
return [k for k in range(1, N+1, 2) if isprime(int(str(k)+str(k+1)+str(k)))]
print(aupto(530)) # Michael S. Branicky, Jul 09 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 25 2015
STATUS
approved