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.

A175332 Numbers whose binary expansion is of the form 11+0*.

This page as a plain text file.
%I A175332 #19 Jul 22 2025 07:56:14
%S A175332 3,6,7,12,14,15,24,28,30,31,48,56,60,62,63,96,112,120,124,126,127,192,
%T A175332 224,240,248,252,254,255,384,448,480,496,504,508,510,511,768,896,960,
%U A175332 992,1008,1016,1020,1022,1023,1536,1792,1920,1984,2016,2032,2040,2044
%N A175332 Numbers whose binary expansion is of the form 11+0*.
%C A175332 Also numbers n such that the set (2^j)%n consists only of the powers of two.
%H A175332 Reinhard Zumkeller, <a href="/A175332/b175332.txt">Table of n, a(n) for n = 1..10000</a>
%H A175332 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.
%F A175332 Sum_{n>=1} 1/a(n) = -2 + A211705. - _Amiram Eldar_, Feb 26 2022
%o A175332 (PARI)
%o A175332 is_11p0s(n)=
%o A175332 { /* Return whether binary expansion has form 11+0* */
%o A175332   local(b);
%o A175332   if ( n<3, return(0) );
%o A175332   b = binary( n/(2^valuation(n,2) ) );
%o A175332   if ( #b<2, return(0) );
%o A175332   for (j=1,#b, if(b[j]==0, return(0) ) );
%o A175332   return(1);
%o A175332 }
%o A175332 for (n=1,2100, if (is_11p0s(n), print1(n,", ") ) ); /* show terms */
%o A175332 (Haskell)
%o A175332 import Data.Set (singleton, deleteFindMin, insert)
%o A175332 a175332 n = a175332_list !! (n-1)
%o A175332 a175332_list = f $ singleton 3 where
%o A175332   f s = x : f (if even x then insert z s' else insert z $ insert (z+1) s')
%o A175332         where z = 2*x; (x, s') = deleteFindMin s
%o A175332 -- _Reinhard Zumkeller_, Sep 24 2014
%o A175332 (Python)
%o A175332 def a_next(a_n): t = a_n + (a_n & 1); return t | (t >> 1)
%o A175332 a_n = 3; a = []
%o A175332 for i in range(53): a.append(a_n); a_n = a_next(a_n) # _Falk Hüffner_, Feb 21 2022
%Y A175332 Cf. A023758, A007088, A211705.
%K A175332 easy,nonn
%O A175332 1,1
%A A175332 _Joerg Arndt_, Apr 12 2010