%I #30 Jun 27 2021 04:43:31
%S 0,1,1,1,1,3,3,1,1,7,5,3,3,5,7,1,1,15,9,7,5,11,13,3,3,13,11,5,7,9,15,
%T 1,1,31,17,15,9,23,25,7,5,27,21,11,13,19,29,3,3,29,19,13,11,21,27,5,7,
%U 25,23,9,15,17,31,1,1,63,33,31,17,47,49,15,9,55,41,23,25,39,57,7,5,59,37
%N Let b(1)=0, b(2)= 1. b(2^m +k) = (b(2^m+1-k) + b(k))/2, 1 <= k <= 2^m, m >= 0. a(n) is numerator of b(n).
%C Denominator of b(n), for n >= 2, is A053644(n-1).
%F From _Yosu Yurramendi_, Mar 13 2019: (Start)
%F Without a(1) = 0, and shifting the terms one place left:
%F a(2^m) = 1, m >= 0;
%F a(2^(m+1)-1-k) = a(2^m+k), m >= 0, 0 < k < 2^m;
%F a(2^(m+1)+k) = a(2^m+k)+2^(m-floor(log_2(k)))*a(k), m >= 0, 0 < k < 2^m.
%F (End)
%p A119608 := proc (mmax) local a,b,m,k,bn,i; b := [0,1] ; for m from 1 to mmax do for k from 1 to 2^m do bn := (b[2^m+1-k]+b[k])/2 ; b := [op(b),bn] ; od ; od ; a := [] ; for i from 1 to nops(b) do a := [op(a),numer(b[i])] ; od ; RETURN(a) ; end: an := A119608(7) : for i from 1 to nops(an) do printf("%d,",an[i]) ; od ; # _R. J. Mathar_, Aug 06 2006
%o (R)
%o maxlevel <- 8 # by choice
%o b <- c(0,1)
%o for(m in 1:maxlevel) for(k in 1:2^m) b[2^m +k] = (b[2^m+1-k] + b[k])/2
%o d <- vector()
%o for(m in 0:maxlevel) for(k in 0:(2^m-1)) d[2^m + k] <- 2^m; d <- c(0,d)
%o a <- b*d
%o a[1:100]
%o # _Yosu Yurramendi_, Feb 05 2019
%o (R)
%o a <- 1
%o maxlevel <- 15 # by choice
%o for(m in 1:5) {
%o a[2^(m+1)-1] <- 1
%o a[2^(m+1) ] <- 1
%o for(k in 1:(2^m-1)){
%o a[2^(m+1)-1-k] <- a[2^m+k]
%o a[2^(m+1) +k] <- a[2^m+k]+2^(m-floor(log2(k)))*a[k]
%o }}
%o a <- c(0,a)
%o a[1:128]
%o # _Yosu Yurramendi_, Mar 13 2019
%Y Cf. A053644.
%K easy,nonn,frac
%O 1,6
%A _Leroy Quet_, Jun 04 2006
%E More terms from _R. J. Mathar_, Aug 06 2006