A345372 a(n) = Sum_{i=1..n} nac(i,n) where nac(i,n) is the n-th i-bonacci number. The n-th i-bonacci number here is equal to 1 for the first i terms, with subsequent terms equaling the sum of the previous n terms.
1, 2, 4, 8, 16, 31, 60, 114, 217, 411, 780, 1481, 2820, 5379, 10288, 19720, 37884, 72924, 140640, 271695, 525698, 1018611, 1976276, 3838889, 7465191, 14531683, 28313776, 55214993, 107762464, 210477611, 411387724, 804609206, 1574671586, 3083549861, 6041628460
Offset: 1
Keywords
Programs
-
Maple
b:= proc(i, n) option remember; `if`(n=0, 0, `if`(n<=i, 1, add(b(i, n-j), j=1..i))) end: a:= n-> add(b(i, n), i=1..n): seq(a(n), n=1..36); # Alois P. Heinz, Jun 16 2021
-
Mathematica
b[i_, n_] := b[i, n] = If[n==0, 0, If[n<=i, 1, Sum[b[i, n-j], {j, 1, i}]]]; a[n_] := Sum[b[i, n], {i, 1, n}]; Table[a[n], {n, 1, 36}] (* Jean-François Alcover, May 29 2022, after Alois P. Heinz *)
Formula
a(n) = Sum_{i=1..n} nac(i,n) where nac(i,n) = 1 if 1 <= n <= i, Sum_{k=1..i} nac(i,n-k) if n > i.
Comments