|
|
A340766
|
|
Number of ordered subsequences of {1,...,2n} containing at least n elements and such that the first differences contain only odd numbers.
|
|
2
|
|
|
1, 3, 7, 17, 43, 106, 273, 678, 1759, 4389, 11430, 28614, 74685, 187433, 489926, 1231957, 3223387, 8118434, 21256897, 53609282, 140442534, 354595210, 929326086, 2348710733, 6157476873, 15575365846, 40843347873, 103392210473, 271181242774, 686944588009
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ c * (27/4)^(n/2) / sqrt(3*Pi*n/2), where c = 14 if n is even and c = 8*sqrt(3) if n is odd. Equivalently, c = 7 + 4*sqrt(3) + (7 - 4*sqrt(3))*(-1)^n. - Vaclav Kotesovec, Jun 19 2021
|
|
EXAMPLE
|
a(3) = 17: [1,2,3], [1,2,5], [1,4,5], [2,3,4], [2,3,6], [2,5,6], [3,4,5], [4,5,6], [1,2,3,4], [1,2,3,6], [1,2,5,6], [1,4,5,6], [2,3,4,5], [3,4,5,6], [1,2,3,4,5], [2,3,4,5,6], [1,2,3,4,5,6].
|
|
MAPLE
|
g:= proc(n, k) option remember; `if`(k>n, 0,
`if`(k in [0, 1], n^k, g(n-1, k-1)+g(n-2, k)))
end:
b:= proc(n, k) option remember;
`if`(k>n, 0, g(n, k)+b(n, k+1))
end:
a:= n-> b(2*n, n):
seq(a(n), n=0..30);
|
|
MATHEMATICA
|
g[n_, k_] := g[n, k] = Which[k > n, 0, k == 0, 1, k == 1, n,
True, g[n - 1, k - 1] + g[n - 2, k]];
b[n_, k_] := b[n, k] = If[k > n, 0, g[n, k] + b[n, k + 1]];
a[n_] := b[2*n, n];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|