OFFSET
1,2
FORMULA
a(n) ~ c * 2^n, where c = 0.487208413167251561410300158795277398357249626073353318217181284278722123325... - Vaclav Kotesovec, Apr 26 2020
MATHEMATICA
a[1] = 1; a[2] = 3; a[3] = 2; a[n_] := a[n] = Sum[a[k], {k, 1, n - 1}] + a[n - 1 - 2^Floor[Log[2, n - 2]]]; Table[a[n], {n, 1, 32}] (* Vaclav Kotesovec, Apr 26 2020 *)
PROG
(PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 3; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa + va[n - 1 - 2^ceil(-1 + log(n-1)/log(2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, Apr 26 2020 (with nn > 2)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 25 2020
STATUS
approved