|
|
A053754
|
|
If k is in the sequence then 2*k and 2*k+1 are not (and 0 is in the sequence); when written in binary k has an even number of bits (0 has 0 digits).
|
|
47
|
|
|
0, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Runs of successive terms with same number of bits have length twice powers of 4 (A081294). [Clarified by Michel Marcus, Oct 21 2020]
The lower and upper asymptotic densities of this sequence are 1/3 and 2/3, respectively. - Amiram Eldar, Feb 01 2021
Also numbers k such that the k-th composition in standard order (row k of A066099) has even sum. The terms and corresponding compositions begin:
0: () 2: (2) 8: (4)
3: (1,1) 9: (3,1)
10: (2,2)
11: (2,1,1)
12: (1,3)
13: (1,2,1)
14: (1,1,2)
15: (1,1,1,1)
(End)
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Range[0, 150], EvenQ @ IntegerLength[#, 2] &] (* Amiram Eldar, Feb 01 2021 *)
|
|
PROG
|
(Haskell)
a053754 n = a053754_list !! (n-1)
a053754_list = 0 : filter (even . a070939) [1..]
(PARI) lista(nn) = {my(va = vector(nn)); for (n=2, nn, my(k=va[n-1]+1); while (#select(x->(x==k\2), va), k++); va[n] = k; ); va; } \\ Michel Marcus, Oct 20 2020
(PARI) a(n) = n-1 + (1<<bitand(logint(6*n-3, 2), -2))\3; \\ Kevin Ryde, Apr 30 2021
|
|
CROSSREFS
|
Positions of even terms in A029837 with offset 0.
The version for Heinz numbers of partitions is A300061, counted by A058696.
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|