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.

A023689 Numbers with exactly 7 ones in binary expansion.

This page as a plain text file.
%I A023689 #30 Mar 07 2025 01:09:23
%S A023689 127,191,223,239,247,251,253,254,319,351,367,375,379,381,382,415,431,
%T A023689 439,443,445,446,463,471,475,477,478,487,491,493,494,499,501,502,505,
%U A023689 506,508,575,607,623,631,635,637,638,671,687
%N A023689 Numbers with exactly 7 ones in binary expansion.
%H A023689 Ivan Neretin, <a href="/A023689/b023689.txt">Table of n, a(n) for n = 1..10000</a>
%H A023689 Robert Baillie, <a href="http://arxiv.org/abs/0806.4410">Summing the curious series of Kempner and Irwin</a>, arXiv:0806.4410 [math.CA], 2008-2015. See p. 18 for Mathematica code irwinSums.m.
%H A023689 M. I. Mazurkov and A. V. Sokolov, <a href="http://dx.doi.org/10.3103/S0735272713090045">Nonlinear substitution S-boxes based on composite power residue codes</a>, Radioelectronics and Communications Systems, Vol. 56, No. 9 (2013). DOI: 10.3103/S0735272713090045.
%F A023689 a(n+1) = A057168(a(n)). - _M. F. Hasler_, Aug 27 2014
%F A023689 Sum_{n>=1} 1/a(n) = 1.386779022721502147026318489565477811900220906277367947393004721391094590038... (calculated using Baillie's irwinSums.m, see Links). - _Amiram Eldar_, Feb 14 2022
%t A023689 Select[ Range[ 127, 704 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==7)& ]
%o A023689 (PARI) is_A023689(n)=hammingweight(n)==7 \\ _M. F. Hasler_, Aug 27 2014
%o A023689 (PARI) print1(t=2^7-1); for(i=2, 50, print1(", "t=A057168(t))) \\ _M. F. Hasler_, Aug 27 2014
%o A023689 (Python)
%o A023689 from itertools import islice
%o A023689 def A023689_gen(): # generator of terms
%o A023689     yield (n:=127)
%o A023689     while True: yield (n:=((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
%o A023689 A023689_list =  list(islice(A023689_gen(),30)) # _Chai Wah Wu_, Mar 06 2025
%Y A023689 Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023690, A023691 (Hamming weight = 1, 2, ..., 9), A057168.
%K A023689 nonn,base,easy
%O A023689 1,1
%A A023689 _Olivier Gérard_