|
|
A373303
|
|
First differences of A371176.
|
|
2
|
|
|
1, 2, 2, 2, 2, 2, 4, 2, 2, 4, 4, 4, 2, 2, 4, 4, 4, 4, 4, 8, 2, 2, 4, 4, 4, 4, 4, 8, 4, 4, 8, 8, 8, 2, 2, 4, 4, 4, 4, 4, 8, 4, 4, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 16, 2, 2, 4, 4, 4, 4, 4, 8, 4, 4, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 16, 4, 4, 8, 8, 8, 8, 8, 16, 8, 8, 16, 16
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
Differences[Join[{1}, Select[Range[2, 1000, 2], DigitCount[#, 2, 1] <= IntegerExponent[#, 2] + 1 &]]] (* Paolo Xausa, May 31 2024 *)
|
|
PROG
|
(PARI) isok(n) = hammingweight(n) <= (valuation(n, 2) + 1);
my(v=select(isok, [1..500])); vector(#v-1, k, v[k+1]-v[k])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|