login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A323578 Primes with distinct digits for which parity of digits alternates. 3
2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 103, 107, 109, 127, 149, 163, 167, 307, 347, 349, 367, 389, 503, 509, 521, 523, 541, 547, 563, 569, 587, 701, 709, 743, 761, 769, 907, 941, 947, 967, 983, 2143, 2309 (list; graph; refs; listen; history; text; internal format)
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
Intersection of A030144 and A029743.
Sequence in context: A030144 A343590 A343591 * A156756 A225659 A068690
KEYWORD
nonn,base,fini,full
AUTHOR
Bernard Schott, Jan 18 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)