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.

A323578 Primes with distinct digits for which parity of digits alternates.

This page as a plain text file.
%I A323578 #30 Mar 14 2019 07:15:38
%S A323578 2,3,5,7,23,29,41,43,47,61,67,83,89,103,107,109,127,149,163,167,307,
%T A323578 347,349,367,389,503,509,521,523,541,547,563,569,587,701,709,743,761,
%U A323578 769,907,941,947,967,983,2143,2309
%N A323578 Primes with distinct digits for which parity of digits alternates.
%C A323578 There are 4426 terms (found by _David A. Corneth_) in this sequence, which is a subsequence of A030144.
%C A323578 The largest prime of this sequence is 987654103 which is also the largest prime with distinct digits in A029743.
%H A323578 David A. Corneth, <a href="/A323578/b323578.txt">Table of n, a(n) for n = 1..4426</a> (Complete sequence)
%H A323578 Chris K. Caldwell and G. L. Honaker, Jr., <a href="https://primes.utm.edu/curios/page.php/987654103.html">987654103</a>, Prime Curios!
%e A323578 2143 is a term as 2, 1, 4 and 3 have even and odd parity alternately and these four digits are all distinct.
%t A323578 {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 *)
%o A323578 (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
%Y A323578 Intersection of A030144 and A029743.
%Y A323578 Cf. A000040, A030141.
%K A323578 nonn,base,fini,full
%O A323578 1,1
%A A323578 _Bernard Schott_, Jan 18 2019