login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123345 Numbers containing all divisors in their binary representation. 5
1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 19, 20, 22, 23, 24, 26, 28, 29, 31, 32, 34, 37, 38, 40, 41, 43, 44, 46, 47, 48, 52, 53, 55, 56, 58, 59, 61, 62, 64, 67, 68, 71, 73, 74, 76, 79, 80, 82, 83, 86, 88, 89, 92, 94, 96, 97, 101, 103, 104, 106, 107, 109, 112, 113, 116, 118 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
q[n_] := AllTrue[Divisors[n], StringContainsQ[IntegerString[n, 2], IntegerString[#, 2]] &]; Select[Range[100], q] (* Amiram Eldar, Jun 05 2022 *)
PROG
(Haskell)
import Data.List (unfoldr, isInfixOf)
a123345 n = a123345_list !! (n-1)
a123345_list = filter
(\x -> all (`isInfixOf` b x) $ map b $ a027750_row x) [1..] where
b = unfoldr (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
-- Reinhard Zumkeller, Oct 27 2012
(Python)
from sympy import divisors
def ok(n):
b = bin(n)[2:]
return n and all(bin(d)[2:] in b for d in divisors(n, generator=True))
print([k for k in range(119) if ok(k)]) # Michael S. Branicky, Jun 05 2022
CROSSREFS
Complement of A093642. Different from A093641.
Cf. A000040 (subsequence), A027750, A218388.
Sequence in context: A328369 A207674 A162722 * A093641 A209638 A191844
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 12 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)