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”).

A356620
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) <= 4 for i = 2,...,k.
3
0, 1, 4, 11, 26, 56, 115, 230, 453, 884, 1716, 3321, 6416, 12383, 23886, 46060, 88803, 171194, 330009, 636136, 1226216, 2363633, 4556076, 8782147, 16928162, 32630112, 62896595, 121237118, 233692093, 450456028, 868281948, 1673667305, 3226097496, 6218502903
OFFSET
0,3
FORMULA
G.f.: (x (-1 - x - x^2 - x^3))/((-1 + x)^2 (-1 + x + x^2 + x^3 + x^4)).
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-5) + a(n-6).
MATHEMATICA
maxDiff = 4; t = Map[Length[Select[Map[{#, Max[Differences[#]]} &,
Drop[Subsets[Range[#]], # + 1]], #[[2]] <= maxDiff &]] &, Range[18]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 04 2022
STATUS
approved