editing
approved
editing
approved
C(x^2)/(1-x*C(x^2)) above is the o.g.f. for A001405. 1/(1-x*S(x^2)) above is the o.g.f for A026003 starting with an additional 1: 1,1,1,3,5,13,25,... - R. J. Mathar, Feb 10 2022
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
Ta(n,) = Sum_{k=0) + T(..n,1) + ... } T(n,nk), T given by A026780.
G. C. Greubel, <a href="/A026787/b026787.txt">Table of n, a(n) for n = 0..1000</a>
T:= proc(n, k) option remember;
if n<0 then 0;
elif k=0 or k =n then 1;
elif k <= n/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) ;
fi ;
end proc:
seq( add(T(n, k), k=0..n), n=0..30); # G. C. Greubel, Nov 02 2019
T[n_, k_]:= T[n, k]= If[n<0, 0, If[k==0 || k==n, 1, If[k<=n/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, Nov 02 2019 *)
(Sage)
@CachedFunction
def T(n, k):
if (n<0): return 0
elif (k==0 or k==n): return 1
elif (k<=n/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, Nov 02 2019
approved
editing
editing
approved
O.g.f.: F(x^2)*(1/(1-x*S(x^2))+C(x^2)*x/(1-x*C(x^2))), where C(x)=(1-sqrt(1-4x))/(2 *x) is o.g.f. for A000108, S(x)=(1-x-sqrt(1-6*x+x^2))/(2*x) is o.g.f. for A006318, and F(x)=S(x)/(1-x*C(x)*S(x)) is o.g.f. for A026781. - Max Alekseyev, Jan 13 2015
approved
editing
editing
approved
1, 2, 5, 11, 26, 58, 136, 306, 717, 1625, 3813, 8697, 20451, 46909, 110563, 254855, 602042, 1393746, 3299304, 7666786, 18182976, 42391546, 100704606, 235452416, 560147414, 1312916040, 3127406812, 7346213746, 17518138314, 41228281888, 98408997716, 231990850378, 554207752781, 1308436686305, 3128033585157
O.g.f.: F(x^2)*(1/(1-x*S(x^2))+C(x^2)*x/(1-x*C(x^2))), where C(x)=(1-sqrt(1-4x))/2 is o.g.f. for A000108, S(x)=(1-x-sqrt(1-6*x+x^2))/(2*x) is o.g.f. for A006318, and F(x)=S(x)/(1-x*C(x)*S(x)) is o.g.f. for A026781. - Max Alekseyev, Jan 13 2015
More terms from Max Alekseyev, Jan 13 2015
approved
editing