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.

A084345 Numbers with a nonprime number of 1's in their binary expansion (complement of A052294).

This page as a plain text file.
%I A084345 #27 Aug 28 2013 04:09:21
%S A084345 0,1,2,4,8,15,16,23,27,29,30,32,39,43,45,46,51,53,54,57,58,60,63,64,
%T A084345 71,75,77,78,83,85,86,89,90,92,95,99,101,102,105,106,108,111,113,114,
%U A084345 116,119,120,123,125,126,128,135,139,141,142,147,149,150,153,154,156,159,163
%N A084345 Numbers with a nonprime number of 1's in their binary expansion (complement of A052294).
%H A084345 Reinhard Zumkeller, <a href="/A084345/b084345.txt">Table of n, a(n) for n = 1..10000</a>
%e A084345 15 is in the sequence because 15_10=1111_2 and 1+1+1+1=4 is composite.
%t A084345 Select[Range[200],!PrimeQ[DigitCount[#,2,1]]&] (* _Harvey P. Dale_, Jan 21 2013 *)
%o A084345 (PARI) for(n=0,200,b=binary(n); if(!isprime(sum(m=1,matsize(b)[2],b[m])),print1(n,",")))
%o A084345 (Haskell)
%o A084345 a084345 n = a084345_list !! (n-1)
%o A084345 a084345_list = filter ((== 0) . a010051' . a000120) [0..]
%o A084345 -- _Reinhard Zumkeller_, Aug 28 2013, Nov 16 2012
%Y A084345 Cf. A052294.
%Y A084345 Cf. A010051, A000120.
%K A084345 easy,nonn,base
%O A084345 1,3
%A A084345 _Zak Seidov_ Jun 22 2003
%E A084345 More terms from _Rick L. Shepherd_, Jun 23 2003
%E A084345 Term 0 added by _Michel Marcus_, Aug 26 2013
%E A084345 b-file adjusted by _Reinhard Zumkeller_, Aug 28 2013