[go: up one dir, main page]

login
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
OFFSET
0,3
LINKS
FORMULA
a(n) = floor(A026633(n)/2) if (n mod 2) = 1 and a(n) = floor((2*A026633(n) + (1+(-1)^n)*A026627(floor(n/2)+1))/4) if (n mod 2) = 0. - G. C. Greubel, Jun 21 2024
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}];
Table[A026634[n], {n, 0, 40}] (* G. C. Greubel, Jun 21 2024 *)
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)) >;
A026627:= [b(n+1) : n in [0..60]];
A026633:= [n le 1 select n+1 else (17*2^(n-2) +(-1)^n)/3 -1: n in [0..60]];
function A026634(n)
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;
[A026634(n): n in [0..60]]; // G. C. Greubel, Jun 21 2024
(SageMath)
@CachedFunction
def T(n, k): # T = A026626
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))
[A026634(n) for n in range(41)] # G. C. Greubel, Jun 21 2024
KEYWORD
nonn
STATUS
approved