|
|
A356621
|
|
a(n) = number of k-tuples (u(1), u(2), ..., u(k)) with 1 <= u(1) < u(2) < ... < u(k) <= n such that u(i) - u(i-1) <= 5 for i = 2,...,k.
|
|
3
|
|
|
0, 1, 4, 11, 26, 57, 119, 242, 485, 964, 1907, 3762, 7410, 14583, 28686, 56413, 110924, 218091, 428777, 842976, 1657271, 3258134, 6405349, 12592612, 24756452, 48669933, 95682600, 188107071, 369808798, 727024989, 1429293531, 2809917134, 5524151673
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (x (-1 - x - x^2 - x^3 - x^4))/((-1 + x)^2 (-1 + x + x^2 + x^3 + x^4 + x^5)).
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-6) + a(n-7).
|
|
MATHEMATICA
|
maxDiff = 5; t = Map[Length[Select[Map[{#, Max[Differences[#]]} &,
Drop[Subsets[Range[#]], # + 1]], #[[2]] <= maxDiff &]] &, Range[20]]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|