|
|
A026634
|
|
a(n) = Sum_{k=0..floor(n/2)} A026626(n, k).
|
|
16
|
|
|
1, 1, 4, 5, 15, 22, 59, 90, 230, 362, 902, 1450, 3551, 5802, 14022, 23210, 55492, 92842, 219974, 371370, 873101, 1485482, 3468893, 5941930, 13793183, 23767722, 54880915, 95070890, 218480607, 380283562, 870164852, 1521134250
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, (6*n-1 + (-1)^n)/4, T[n-1, k-1] +T[n-1, k]]];
A026634[n_]:= Sum[T[n, k], {k, 0, n}];
|
|
PROG
|
(Magma)
b:= func< n | n le 2 select 2*n-1 else ((357*n^3-2696*n^2+6441*n-4822)*Self(n-1) +2*(2*n-7)*(51*n^2-203*n+188)*Self(n-2))/(2*(n-1)*(51*n^2-305*n+442)) >;
A026633:= [n le 1 select n+1 else (17*2^(n-2) +(-1)^n)/3 -1: n in [0..60]];
if (n mod 2) eq 1 then return Floor(A026633[n+1]/2);
else return Floor( (2*A026633[n+1] + (1+(-1)^n)*A026627[Floor(n/2) +1])/4);
end if;
end function;
(SageMath)
@CachedFunction
if (k==0 or k==n): return 1
elif (k==1 or k==n-1): return int(3*n//2)
else: return T(n-1, k-1) + T(n-1, k)
def A026634(n): return sum(T(n, k) for k in range((n//2)+1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|