OFFSET
1,1
COMMENTS
Also numbers n such that the set (2^j)%n consists only of the powers of two.
LINKS
FORMULA
Sum_{n>=1} 1/a(n) = -2 + A211705. - Amiram Eldar, Feb 26 2022
PROG
(PARI)
is_11p0s(n)=
{ /* Return whether binary expansion has form 11+0* */
local(b);
if ( n<3, return(0) );
b = binary( n/(2^valuation(n, 2) ) );
if ( #b<2, return(0) );
for (j=1, #b, if(b[j]==0, return(0) ) );
return(1);
}
for (n=1, 2100, if (is_11p0s(n), print1(n, ", ") ) ); /* show terms */
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a175332 n = a175332_list !! (n-1)
a175332_list = f $ singleton 3 where
f s = x : f (if even x then insert z s' else insert z $ insert (z+1) s')
where z = 2*x; (x, s') = deleteFindMin s
-- Reinhard Zumkeller, Sep 24 2014
(Python)
def a_next(a_n): t = a_n + (a_n & 1); return t | (t >> 1)
a_n = 3; a = []
for i in range(53): a.append(a_n); a_n = a_next(a_n) # Falk Hüffner, Feb 21 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joerg Arndt, Apr 12 2010
STATUS
approved