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!)
A306263 Numbers k such that, for any divisor d of k, the Hamming weight of d divides k. 3
1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 24, 32, 34, 36, 40, 42, 48, 60, 64, 66, 68, 72, 80, 84, 92, 96, 108, 116, 120, 126, 128, 132, 136, 144, 156, 160, 168, 172, 180, 184, 192, 204, 212, 216, 222, 228, 232, 240, 246, 252, 256, 264, 272, 276, 284, 288, 300, 310 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The Hamming weight of a number is given by A000120.
This sequence is a binary variant of A285815.
This sequence is infinite as it contains all powers of 2 (A000079).
All terms belong to A049445.
If k belongs to the sequence, then 2*k belongs to the sequence.
All terms except 1 are even. - Robert Israel, Mar 05 2019
LINKS
EXAMPLE
For n = 108:
- the divisors of 108 are 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54, 108,
- the corresponding Hamming weights are 1, 1, 2, 1, 2, 2, 2, 2, 4, 2, 4, 4,
- they all divide 108,
- hence 108 belongs to the sequence.
For n = 98:
- the divisors of 98 are 1, 2, 7, 14, 49, 98,
- the correspond Hamming weights are 1, 1, 3, 3, 3, 3,
- 3 does not divide 98,
- hence 98 does not belong to the sequence.
MAPLE
filter:= proc(n) local F;
F:= map(convert, map(convert, numtheory:-divisors(n), base, 2), `+`);
andmap(t -> n mod t = 0, F)
end proc:
select(filter, [$1..1000]); # Robert Israel, Mar 05 2019
MATHEMATICA
Select[Range@ 310, With[{k = #}, AllTrue[Divisors@ k, Mod[k, DigitCount[#, 2, 1]] == 0 &]] &] (* Michael De Vlieger, Mar 05 2019 *)
PROG
(PARI) is(n) = fordiv(n, d, if (n%hammingweight(d), return (0))); return ( )
(Magma) [k:k in [1..310]| forall{d:d in Divisors(k)| k mod &+Intseq(d, 2) eq 0}]; // Marius A. Burtea, Dec 30 2019
CROSSREFS
Positions of zeros in A324393.
Sequence in context: A267817 A177917 A071594 * A071596 A090778 A097380
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 02 2019
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 April 16 01:01 EDT 2024. Contains 371696 sequences. (Running on oeis4.)