OFFSET
1,2
COMMENTS
Equivalently, a(n) is the number of distinct terms in row n of the Stern-Brocot sequence (A002487) when that sequence is divided into blocks of lengths 1, 2, 4, 8, 16, 32, ...
It would be nice to have a formula or recurrence, or even some bounds. Empirically, a(n) seems to be roughly 2^(2n/3) for the known values. Note that the first half of row n has about 2^(n-2) terms, and the maximal multiplicity is given by A293957(n), so 2^(n-2)/A293957(n) is a lower bound on a(n), which seems not too bad for the known values. - N. J. A. Sloane, Nov 04 2017
LINKS
MAPLE
A049456 := proc(n, k)
option remember;
if n =1 then
if k >= 0 and k <=1 then
1;
else
0 ;
end if;
elif type(k, 'even') then
procname(n-1, k/2) ;
else
procname(n-1, (k+1)/2)+procname(n-1, (k-1)/2) ;
end if;
end proc: # R. J. Mathar, Dec 12 2014
# A293160. This is not especially fast, but it will easily calculate the first 26 terms and confirm Barry Carter's values.
rho:=n->[seq(A049456(n, k), k=0..2^(n-1))];
w:=n->nops(convert(rho(n), set));
[seq(w(n), n=1..26)];
MATHEMATICA
Length[Union[#]]& /@ NestList[Riffle[#, Total /@ Partition[#, 2, 1]]&, {1, 1}, 26] (* Jean-François Alcover, Mar 25 2020, after Harvey P. Dale in A049456 *)
PROG
(Python)
from itertools import chain, product
from functools import reduce
def A293160(n): return n if n <= 1 else len({1}|set(sum(reduce(lambda x, y:(x[0], x[0]+x[1]) if y else (x[0]+x[1], x[1]), chain(k, (1, )), (1, 0))) for k in product((False, True), repeat=n-2))) # Chai Wah Wu, Jun 20 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, Oct 12 2017, answering a question raised by Barry Carter in an email message. Barry Carter worked out the first 26 terms.
EXTENSIONS
a(28)-a(39) from Don Reble, Oct 16 2017
STATUS
approved