OFFSET
1,1
COMMENTS
There are 4426 terms (found by David A. Corneth) in this sequence, which is a subsequence of A030144.
The largest prime of this sequence is 987654103 which is also the largest prime with distinct digits in A029743.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..4426 (Complete sequence)
Chris K. Caldwell and G. L. Honaker, Jr., 987654103, Prime Curios!
EXAMPLE
2143 is a term as 2, 1, 4 and 3 have even and odd parity alternately and these four digits are all distinct.
MATHEMATICA
{2}~Join~Select[Prime@ Range@ 350, And[Max@ Tally[#][[All, -1]] == 1, AllTrue[#[[Range[2, Length[#], 2] ]], EvenQ], AllTrue[#[[Range[1, Length[#], 2] ]], OddQ]] &@ Reverse@ IntegerDigits@ # &] (* Michael De Vlieger, Jan 19 2019 *)
PROG
(PARI) allTerms() = {my(res = List([2])); c = vector(10); odd = [1, 3, 5, 7, 9]; even = [0, 2, 4, 6, 8]; for(i = 0, 119, pi = numtoperm(5, i); vi = vector(5, k, odd[pi[k]]); for(j = 0, 119, pj = numtoperm(5, j); vj = vector(5, k, even[pj[k]]); for(m = 1, 5, c[2*m] = vi[m]; c[2*m - 1] = vj[m]; ); cv = fromdigits(c); for(m = 1, 10, if(isprime(cv % 10^m), listput(res, cv % 10^m); ) ) ) ); listsort(res, 1); res } \\ David A. Corneth, Jan 18 2019
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Bernard Schott, Jan 18 2019
STATUS
approved