OFFSET
1,2
PROG
(PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[2*(n - 1 - 2^logint(n-2, 2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, May 03 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, May 03 2020
STATUS
approved