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.

A178350 Semiprimes with both a prime number of 0's and a prime number of 1's in their binary representations.

This page as a plain text file.
%I A178350 #11 Mar 10 2019 01:43:56
%S A178350 9,10,21,22,25,26,35,38,49,65,87,91,93,94,115,118,121,122,133,134,143,
%T A178350 145,146,155,158,161,185,194,203,205,206,213,214,217,218,319,381,382,
%U A178350 415,445,446,471,478,493,501,502,505,515,517,527,529,535,542,545,551
%N A178350 Semiprimes with both a prime number of 0's and a prime number of 1's in their binary representations.
%H A178350 Harvey P. Dale, <a href="/A178350/b178350.txt">Table of n, a(n) for n = 1..1000</a>
%e A178350 a(1)=9 because 9(written in base 10)=1001 where 2=prime number of 0's and 2=prime number of 1's.
%p A178350 A000120 := proc(n) add(d,d=convert(n,base,2)) ; end proc:
%p A178350 A080791 := proc(n) dgs :=convert(n,base,2) ; nops(dgs)-A000120(n) ; end proc:
%p A178350 for n from 1 to 300 do spr :=A001358(n) ; if isprime( A080791(spr) ) and isprime(A000120(spr)) then printf("%d,",spr) ; end if; end do: # _R. J. Mathar_, Aug 12 2010
%t A178350 Select[Range[600],PrimeOmega[#]==2&&AllTrue[{DigitCount[ #,2,0], DigitCount[ #,2,1]},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, May 25 2016 *)
%Y A178350 Cf. A144214, A178064, A178065.
%K A178350 nonn,base
%O A178350 1,1
%A A178350 _Juri-Stepan Gerasimov_, May 25 2010
%E A178350 Corrected (167 removed) by _R. J. Mathar_, Aug 12 2010