login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
0,3
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
Clark Kimberling, Sep 04 2022
STATUS
approved