|
|
A026563
|
|
a(n) = T(n, floor(n/2)), where T is given by A026552.
|
|
18
|
|
|
1, 1, 2, 2, 7, 8, 24, 28, 93, 111, 362, 436, 1452, 1763, 5880, 7176, 24089, 29521, 99386, 122182, 412637, 508595, 1721500, 2126312, 7211536, 8923136, 30312960, 37563930, 127790379, 158563368, 540082784, 670893296, 2287577537
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+2)/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k] + T[n-1, k-1], T[n-1, k-2] + T[n-1, k]]]]; (* T=A026552 *)
a[n_]:= a[n]= Block[{$RecursionLimit = Infinity}, T[n, Floor[n/2]]];
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n+2)//2
elif (n%2==0): return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
else: return T(n-1, k) + T(n-1, k-2)
|
|
CROSSREFS
|
Cf. A026552, A026553, A026554, A026555, A026556, A026557, A026558, A026559, A026560, A026566, A026567, A027272, A027273, A027274, A027275, A027276.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|