OFFSET
1,1
COMMENTS
For n > 9, the center digit is not considered when making the calculation. For a prime number to be in this sequence, both the substring to the left of the center and the substring to the right of the center must be nonprime.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
479 is prime. The left part of (4)79 is not prime. The right part of 47(9) is not prime.
MAPLE
q:= n-> isprime(n) and (s-> (h-> not ormap(x-> isprime(parse(x)),
[s[1..h], s[-h..-1]]))(iquo(length(s), 2)))(""||n):
select(q, [$11..2000])[]; # Alois P. Heinz, Sep 14 2020
MATHEMATICA
lhrhQ[p_]:=Module[{idp=IntegerDigits[p], c}, c=Floor[Length[idp]/2]; AllTrue[ {FromDigits[ Take[idp, c]], FromDigits[Take[idp, -c]]}, !PrimeQ[#]&]]; Select[Prime[Range[5, 200]], lhrhQ] (* Harvey P. Dale, Aug 09 2023 *)
PROG
(PARI) lista(nn) = forprime(p=11, nn, my(l=#Str(p), e=floor(l/2), left=floor(p/10^(e+l%2)), right=p-floor(p/10^e)*10^e); if(!isprime(left) && !isprime(right), print1(p, ", ")))
(Python)
from sympy import nextprime, isprime
A337508_list, p = [], 11
while p < 10**6:
s = str(p)
l = len(s)//2
if not (isprime(int(s[:l])) or isprime(int(s[-l:]))):
A337508_list.append(p)
p = nextprime(p) # Chai Wah Wu, Sep 14 2020
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Iain Fox, Aug 30 2020
STATUS
approved