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.

A337508 Primes such that neither the left half nor the right half of the prime is prime.

This page as a plain text file.
%I A337508 #19 Aug 09 2023 16:18:42
%S A337508 11,19,41,61,89,101,109,131,139,149,151,179,181,191,199,401,409,419,
%T A337508 421,431,439,449,461,479,491,499,601,619,631,641,659,661,691,809,811,
%U A337508 821,829,839,859,881,911,919,929,941,971,991,1009,1021,1033,1039,1049,1051
%N A337508 Primes such that neither the left half nor the right half of the prime is prime.
%C A337508 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.
%C A337508 If a number appears in this sequence, it will not appear in A125523, A125524, or A125525.
%C A337508 A000040 is the union of this sequence, A125523, A125524, and A125525.
%H A337508 Harvey P. Dale, <a href="/A337508/b337508.txt">Table of n, a(n) for n = 1..1000</a>
%e A337508 479 is prime. The left part of (4)79 is not prime. The right part of 47(9) is not prime.
%p A337508 q:= n-> isprime(n) and (s-> (h-> not ormap(x-> isprime(parse(x)),
%p A337508         [s[1..h], s[-h..-1]]))(iquo(length(s), 2)))(""||n):
%p A337508 select(q, [$11..2000])[];  # _Alois P. Heinz_, Sep 14 2020
%t A337508 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 *)
%o A337508 (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, ", ")))
%o A337508 (Python)
%o A337508 from sympy import nextprime, isprime
%o A337508 A337508_list, p = [], 11
%o A337508 while p < 10**6:
%o A337508     s = str(p)
%o A337508     l = len(s)//2
%o A337508     if not (isprime(int(s[:l])) or isprime(int(s[-l:]))):
%o A337508         A337508_list.append(p)
%o A337508     p = nextprime(p) # _Chai Wah Wu_, Sep 14 2020
%Y A337508 Cf. A000040, A125523, A125524, A125525.
%K A337508 nonn,easy,base
%O A337508 1,1
%A A337508 _Iain Fox_, Aug 30 2020