Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Oct 30 2023 07:27:14
%S 11,19,127,139,149,151,157,163,181,191,193,199,233,269,277,421,487,
%T 1117,1123,1129,1153,1171,1187,1201,1213,1217,1231,1237,1249,1259,
%U 1279,1289,1291,1297,1301,1303,1319,1321,1327,1361,1381,1399,1423,1427,1429,1447
%N Primes whose digits, after the first, form a nonprime number not occurring earlier.
%C The corresponding nonprime numbers are in A238333.
%H Reinhard Zumkeller, <a href="/A238332/b238332.txt">Table of n, a(n) for n = 1..10000</a> (first 2700 terms from T. D. Noe)
%t t = {}; eList = {}; p = 7; While[Length[t] < 1000, p = NextPrime[p]; e = FromDigits[Rest[IntegerDigits[p]]]; If[! PrimeQ[e] && ! MemberQ[eList, e], AppendTo[t, p]; AppendTo[eList, e]]]; t
%o (Haskell)
%o a238332 n = a238332_list !! (n-1)
%o a238332_list = f [] $ drop 4 a000040_list where
%o f xs (p:ps) | a010051 t == 1 || t `elem` xs = f xs ps
%o | otherwise = p : f (t:xs) ps
%o where t = read $ tail $ show p
%o -- _Reinhard Zumkeller_, Feb 28 2014
%Y Cf. A000040 (prime numbers), A238333.
%Y Cf. A010051.
%K nonn,base
%O 1,1
%A _T. D. Noe_, Feb 28 2014