OFFSET
1,1
COMMENTS
Also denominator of alternate fractions in Kepler's tree as shown in A294442. - N. J. A. Sloane, Nov 20 2017
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..2048 (computed from b-file of A020650 provided by T. D. Noe)
FORMULA
From Yosu Yurramendi, Jan 04 2016: (Start)
a(2^(m+1)+k+1) - a(2^m+k+1) = A071585(k), m >= 0, 0 <= k < 2^m.
a(2^(m+2)-k) = a(2^(m+1)-k) + a(2^m-k), m > 0, 0 <= k < 2^m-1.
(End)
a(2^n) = A000045(n+3). - Antti Karttunen, Jan 29 2016, based on above.
a(2^m+k) = A071585(2^(m+1)+k), m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, May 16 2018
MATHEMATICA
(* b = A020650 *) b[1] = 1; b[2] = 2; b[3] = 1; b[n_] := b[n] = Switch[ Mod[n, 4], 0, b[n/2 + 1] + b[n/2], 1, b[(n - 1)/2 + 1], 2, b[(n - 2)/2 + 1] + b[(n - 2)/2], 3, b[(n - 3)/2]]; a[1] = 2; a[n_] := b[4 n - 4]; Array[a, 100] (* Jean-François Alcover, Jan 22 2016, after Yosu Yurramendi's formula for A020650 *)
PROG
(R)
maxlevel <- 15
d <- c(1, 2)
for(m in 0:maxlevel)
for(k in 1:2^m) {
d[2^(m+1) +k] <- d[k] + d[2^m+k]
d[2^(m+1)+2^m+k] <- d[2^(m+1)+k]
}
a <- vector()
for(m in 0:maxlevel) for(k in 0:(2^m-1)) a[2^m+k] <- d[2^(m+1)+k]
a[1:63]
# Yosu Yurramendi, May 16 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 28 2003
STATUS
approved