A050064 a(n) = a(n-1) + a(m) for n >= 4, where m = 2*n - 3 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1 and a(2) = a(3) = 3.
1, 3, 3, 4, 7, 8, 11, 18, 29, 30, 33, 40, 51, 80, 113, 164, 277, 278, 281, 288, 299, 328, 361, 412, 525, 802, 1083, 1382, 1743, 2268, 3351, 5094, 8445, 8446, 8449, 8456, 8467, 8496, 8529, 8580, 8693, 8970, 9251, 9550, 9911, 10436
Offset: 1
Keywords
Links
- Ivan Neretin, Table of n, a(n) for n = 1..8193
Crossrefs
Programs
-
Maple
a := proc(n) option remember; `if`(n < 4, [1, 3, 3][n], a(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 3)): end proc: seq(a(n), n = 1..40); # Petros Hadjicostas, Nov 18 2019
-
Mathematica
Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 3, 3}, Flatten@Table[2 k - 1, {n, 5}, {k, 2^n}]] (* Ivan Neretin, Sep 07 2015 *)
Extensions
Name edited by Petros Hadjicostas, Nov 18 2019
Comments