login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A119608
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).
2
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, 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, 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
OFFSET
1,6
COMMENTS
Denominator of b(n), for n >= 2, is A053644(n-1).
FORMULA
From Yosu Yurramendi, Mar 13 2019: (Start)
Without a(1) = 0, and shifting the terms one place left:
a(2^m) = 1, m >= 0;
a(2^(m+1)-1-k) = a(2^m+k), m >= 0, 0 < k < 2^m;
a(2^(m+1)+k) = a(2^m+k)+2^(m-floor(log_2(k)))*a(k), m >= 0, 0 < k < 2^m.
(End)
MAPLE
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
PROG
(R)
maxlevel <- 8 # by choice
b <- c(0, 1)
for(m in 1:maxlevel) for(k in 1:2^m) b[2^m +k] = (b[2^m+1-k] + b[k])/2
d <- vector()
for(m in 0:maxlevel) for(k in 0:(2^m-1)) d[2^m + k] <- 2^m; d <- c(0, d)
a <- b*d
a[1:100]
# Yosu Yurramendi, Feb 05 2019
(R)
a <- 1
maxlevel <- 15 # by choice
for(m in 1:5) {
a[2^(m+1)-1] <- 1
a[2^(m+1) ] <- 1
for(k in 1:(2^m-1)){
a[2^(m+1)-1-k] <- a[2^m+k]
a[2^(m+1) +k] <- a[2^m+k]+2^(m-floor(log2(k)))*a[k]
}}
a <- c(0, a)
a[1:128]
# Yosu Yurramendi, Mar 13 2019
CROSSREFS
Cf. A053644.
Sequence in context: A026515 A075772 A142157 * A375849 A364633 A333513
KEYWORD
easy,nonn,frac
AUTHOR
Leroy Quet, Jun 04 2006
EXTENSIONS
More terms from R. J. Mathar, Aug 06 2006
STATUS
approved