OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
Conjecture: (-n+2)*a(n) +(n-2)*a(n-1) +2*(4*n-13)*a(n-2) +8*(-n+4)*a(n-3) +5*(-3*n+14)*a(n-4) +(15*n-94)*a(n-5) +2*(-2*n+9)*a(n-6) +4*(n-6)*a(n-7)=0. - R. J. Mathar, Oct 26 2019
MAPLE
A026733 := proc(n)
add(A026725(n, k), k=0..floor(n/2)) ;
end proc:
seq(A026733(n), n=0..10) ; # R. J. Mathar, Oct 26 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[OddQ[n] && k==(n-1)/2, T[n-1, k-1] + T[n-2, k-1] + T[n-1, k], T[n-1, k-1] + T[n-1, k]]]; Table[Sum[T[n, k], {k, 0, Floor[n/2]}], {n, 0, 30}] (* G. C. Greubel, Oct 26 2019 *)
PROG
(PARI) T(n, k) = if(k==n || k==0, 1, if(2*k==n-1, T(n-1, k-1) + T(n-2, k-1) + T(n-1, k), T(n-1, k-1) + T(n-1, k) ));
vector(31, n, sum(k=0, floor(n-1/2), T(n-1, k)) ) \\ G. C. Greubel, Oct 26 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==0 or k==n): return 1
elif (mod(n, 2)==1 and k==(n-1)/2): return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k)
else: return T(n-1, k-1) + T(n-1, k)
[sum(T(n, k) for k in (0..floor(n/2))) for n in (0..30)] # G. C. Greubel, Oct 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved