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 A144213 #29 Dec 27 2023 16:15:48 %S A144213 17,19,37,41,43,53,71,79,83,89,101,103,107,109,113,131,137,151,157, %T A144213 167,173,179,181,193,199,211,227,229,233,241,257,263,269,277,281,293, %U A144213 311,317,337,347,349,353,359,367,373,379,389,401,431,439,443,449,461,463 %N A144213 Primes with a prime number of 0's in their binary representations. %H A144213 Robert Israel, <a href="/A144213/b144213.txt">Table of n, a(n) for n = 1..10000</a> %e A144213 41, a prime, in binary is 101001. This has three 0's and 3 is prime, so 41 is in the sequence. %p A144213 A080791 := proc(n) local i,dgs ; dgs := convert(n,base,2) ; nops(dgs)-add(i,i=dgs) ; end: isA144213 := proc(n) local no0 ; no0 := A080791(n) ; if isprime(n) and isprime(no0) then true ; else false; fi; end: for n from 1 to 1200 do if isA144213(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Sep 17 2008 %p A144213 # second Maple program: %p A144213 q:= n-> isprime(n) and isprime(add(1-i, i=Bits[Split](n))): %p A144213 select(q, [$1..500])[]; # _Alois P. Heinz_, Dec 27 2023 %t A144213 nmax = 100; %t A144213 Select[Prime[Range[nmax]], %t A144213 PrimeQ[Total@Mod[1 + IntegerDigits[#, 2], 2]] &] (* _Andres Cicuttin_, Jul 08 2020 *) %t A144213 Select[Prime[Range[100]],PrimeQ[DigitCount[#,2,0]]&] (* _Harvey P. Dale_, Feb 03 2021 *) %o A144213 (Python) %o A144213 from sympy import isprime %o A144213 def ok(n): return isprime(n.bit_length()-n.bit_count()) and isprime(n) %o A144213 print([k for k in range(464) if ok(k)]) # _Michael S. Branicky_, Dec 27 2023 %Y A144213 Cf. A081092, A144214. Intersection of A000040 and A144754. %K A144213 base,nonn %O A144213 1,1 %A A144213 _Leroy Quet_, Sep 14 2008 %E A144213 More terms from _R. J. Mathar_, Sep 17 2008