login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026787 a(n) = Sum_{k=0..n} T(n,k), T given by A026780. 12
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
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
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
MAPLE
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
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
Sequence in context: A159929 A362740 A291233 * A064416 A006138 A291930
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Max Alekseyev, Jan 13 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 05:44 EDT 2024. Contains 371918 sequences. (Running on oeis4.)