OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
Conjecture: G.f.: -(1-2*x-5*x^2+10*x^3 - sqrt(1-10*x^2+29*x^4-20*x^6) )/(2*x*(1-2*x-5*x^2+10*x^3)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
Conjecture: (n+1)*a(n) -2*a(n-1) +2*(-5*n+3)*a(n-2) +12*a(n-3) +(29*n-71)*a(n-4) -10*a(n-5) +20*(-n+5)*a(n-6)=0. - R. J. Mathar, Jun 30 2013
Conjecture: a(n) ~ (2+sqrt(5) + (-1)^n*(2-sqrt(5))) * 5^(n/2) / sqrt(2*Pi*n). - Vaclav Kotesovec, Feb 12 2014
MAPLE
T:= proc(n, k) option remember;
if n<0 then 0;
elif k=0 or k = n then 1;
elif type(n, 'odd') and k <= (n-1)/2 then
procname(n-1, k-1)+procname(n-2, k-1)+procname(n-1, k) ;
else
procname(n-1, k-1)+procname(n-1, k) ;
end if ;
end proc;
seq(add(T(n, k), k=0..n), n=0..30); # G. C. Greubel, Oct 31 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[n<0, 0, 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, n}], {n, 0, 30}] (* G. C. Greubel, Oct 31 2019 *)
PROG
(Sage)
@CachedFunction
def T(n, k):
if (n<0): return 0
elif (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..n)) for n in (0..30)] # G. C. Greubel, Oct 31 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved