OFFSET
1,3
COMMENTS
The plot of terms of the form k - 2^floor(log_2(k)) shows quasi-periodic structures on the intervals [2^i, 2^(i+1)]. In general, all sequences of the form "Integers whose Hamming weight is f(x)", where f(x) is an integer valued function, are quasi-periodic on intervals [2^i, 2^(i+1)].
The powers of 2 (A000079) are terms.
A023690 is a subsequence.
EXAMPLE
For k = 255: A000120(255) = 8 = 2^3 is a cube, thus 255 is a term.
MATHEMATICA
Select[Range[0, 1200], IntegerQ[Surd[DigitCount[#, 2, 1], 3]] &] (* Amiram Eldar, Mar 05 2025 *)
PROG
(PARI) isok(k) = ispower(hammingweight(k), 3); \\ Michel Marcus, Mar 05 2025
(Python)
from itertools import count, islice, combinations
from sympy import integer_nthroot
def A381720_gen(): # generator of terms
a = []
yield 0
for l in count(1):
b = 1<<l-1
yield from sorted(sum(p)+b for i in range(1, integer_nthroot(l, 3)[0]+1) for p in combinations(a, i**3-1))
a.append(b)
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Ctibor O. Zizka, Mar 05 2025
STATUS
approved