login
A141820
a(1)=1. a(n) = the smallest integer > a(n-1) that is divisible by the number of 1's in the binary representation of n.
2
1, 2, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 21, 24, 25, 26, 28, 30, 32, 33, 36, 40, 42, 45, 48, 52, 54, 56, 60, 65, 66, 68, 70, 72, 74, 75, 78, 80, 82, 84, 87, 88, 90, 92, 96, 100, 102, 105, 108, 112, 114, 116, 120, 125, 126, 128, 132, 135, 136, 140, 145, 150, 151, 152
OFFSET
1,2
LINKS
EXAMPLE
19 in binary is 10011, which has 3 ones. a(18) = 28. Checking the integers > 28, 29 is not divisible by 3. But 30 is divisible by 3. So a(19) = 30.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Ceiling[(a[n - 1] + 1)/(bw = DigitCount[n, 2, 1])] * bw; Array[a, 100] (* Amiram Eldar, Jul 16 2023 *)
CROSSREFS
Sequence in context: A354912 A091529 A184967 * A267137 A095775 A035063
KEYWORD
nonn,base
AUTHOR
Leroy Quet, Jul 08 2008
EXTENSIONS
Extended by Ray Chandler, Jun 21 2009
Wrong term 3 removed by Amiram Eldar, Jul 16 2023
STATUS
approved