OFFSET
0,3
COMMENTS
Leading zeros in the binary expansion of n are ignored.
The value a(0) = 1 corresponds to the empty concatenation.
See A301453 for similar sequences.
For some odd o = 2*k + 1, is there some k such that for all e > k, a(o * 2^e) = a(o + 2^(e - 1)) + c for some c? - David A. Corneth, Apr 15 2018
LINKS
FORMULA
a(2^n - 1) = 1 for any n >= 0.
a(2^n) = n + 1 for any n >= 0.
From David A. Corneth, Apr 15 2018: (Start)
Is a(2^n + i) >= a(2^n) for 0 <= i <= 2^n - 2?
What is the least k(n) such that
a(2^n + i) <= a(2^n + k(n)) for 1 <= i <= 2^n - 2? (End)
EXAMPLE
For n = 20: the binary expansion of 20, "10100", can be split in 10 ways into aperiodic substrings:
- (10100),
- (101)(0)(0),
- (10)(100),
- (10)(10)(0),
- (10)(1)(0)(0),
- (1)(0100),
- (1)(010)(0),
- (1)(0)(100),
- (1)(0)(10)(0),
- (1)(0)(1)(0)(0).
Hence a(20) = 10.
PROG
(PARI) a(n) = if (n==0, return (1), my (v=0); for (w=1, #binary(n), my (ok=1); fordiv (w, d, if (d<w && #Set(digits(n % (2^w), 2^d))<=1, ok = 0; break)); if (ok, v += a(n \ (2^w)))); return (v))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 08 2018
STATUS
approved