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.
%I A386004 #23 Jul 16 2025 10:13:51 %S A386004 2,3,5,7,11,23,29,41,43,47,61,67,83,89,101,181,211,223,227,229,233, %T A386004 241,263,269,277,281,283,383,401,409,421,433,443,449,461,463,467,487, %U A386004 499,601,607,641,643,647,661,677,683,727,787,809,811,821,823,827,829,863 %N A386004 Primes whose digit set intersects the odd digits in at most one element and intersects the even digits in at most two elements. %C A386004 From _David A. Corneth_, Jul 14 2025: (Start) %C A386004 Terms can have at most three distinct digits. %C A386004 Terms > 5 cannot have a digit 5. Proof: Terms > 5 are odd as they are prime. They cannot have a last digit 5. So if they have a digit 5 then they have at least two distinct odd digits contradicting the sequence definition of having at most one odd digit. (End) %e A386004 101 is a term because it is prime and its digit set is {0, 1} — containing at most one odd digit and no more than two distinct even digits. %e A386004 1021 is a term because it is prime and its digit set is {0,1,2} — containing at most one odd digit and no more than two distinct even digits. %t A386004 Select[Prime[Range[150]],Length[Intersection[d=IntegerDigits[#],{1,3,5,7,9}]]<=1 && Length[Intersection[d,{0,2,4,6,8}]]<=2 &] (* _Stefano Spezia_, Jul 14 2025 *) %o A386004 (PARI) is(n) = if(!isprime(n), return(0)); my(s=Set(digits(n)), odd=0); if(#s>3,return(0)); odd=sum(i=1, #s ,bitand(s[i], 1)); if(odd > 1, return(0)); if(#s-odd > 2, return(0)); 1 \\ _David A. Corneth_, Jul 14 2025 %Y A386004 Cf. A000040, A020469, A020450, A020457, A020460, A385770. %K A386004 nonn,base %O A386004 1,1 %A A386004 _Jean-Marc Rebert_, Jul 14 2025