login
Primes with alternate digits even and odd, and most significant digit even.
1

%I #18 Oct 28 2023 10:46:13

%S 2,23,29,41,43,47,61,67,83,89,2129,2141,2143,2161,2309,2341,2347,2381,

%T 2383,2389,2503,2521,2543,2549,2707,2729,2741,2749,2767,2789,2903,

%U 2909,2927,2963,2969,4127,4129,4327,4349,4363,4507,4523,4547,4549,4561,4567,4583

%N Primes with alternate digits even and odd, and most significant digit even.

%C The only difference compared to A068887 is that the 3 is missing here. - _R. J. Mathar_, May 26 2013

%H Harvey P. Dale, <a href="/A226016/b226016.txt">Table of n, a(n) for n = 1..2000</a>

%e 2143 is a member since its digits are alternatively even and odd.

%t a[n_,k_]:=Union[Boole/@EvenQ[Take[IntegerDigits[n],{k,-1,2}]]]; Join[{2},Select[Prime[Range[5,620]],{a[#,1],a[#,2]}=={{1},{0}} &]]

%t Select[Prime[Range[1000]],Boole[EvenQ[IntegerDigits[#]]]==PadRight[{},IntegerLength[#],{1,0}]&] (* _Harvey P. Dale_, Oct 28 2023 *)

%Y Cf. A000040, A030144.

%K nonn,base

%O 1,1

%A _Jayanta Basu_, May 22 2013