login
A396689
Numbers k such that binomial(x + 4, 5) - binomial(x, 5) = k^2 for some integer x >= 5.
1
21, 119, 2059, 11661, 201761, 1142659, 19770519, 111968921, 1937309101, 10971811599, 189836521379, 1075125567781, 18602041786041, 105351333830939, 1822810258510639, 10323355589864241, 178616803292256581, 1011583496472864679, 17502623912382634299, 99124859298750874301
OFFSET
1,1
COMMENTS
binomial(x + 4, 5) - binomial(x, 5) counts 5-multisets from an x-set containing at least one repeated element. The sequence lists the values k for which this count equals k^2.
Since binomial(x + 4, 5) - binomial(x, 5) = x^2*(x^2 + 5)/6, the condition binomial(x + 4, 5) - binomial(x, 5) = k^2 is equivalent to x^2 - 6*z^2 = -5 with k = x*z. Thus the terms are the products x*z taken over the positive integer solutions (x, z) of x^2 - 6*z^2 = -5.
The sequence is the increasing merge of two subsequences arising from the two branches of the Pell equation x^2 - 6*z^2 = -5. Each subsequence satisfies s(n) = 98*s(n - 1) - s(n - 2). Since the two subsequences interlace, a(n) = 98*a(n - 2) - a(n - 4) for n >= 5.
The restriction x >= 5 excludes the trivial cases binomial(x + 1, 2) - binomial(x, 2) = x and binomial(x + 2, 3) - binomial(x, 3) = x^2, which imply the ubiquitous representations k^2 = binomial(k^2 + 1, 2) - binomial(k^2, 2) = binomial(k + 2, 3) - binomial(k, 3).
In the more general equation binomial(x + y - 1, y) - binomial(x, y) = k^2, the additional solution 3333^2 = binomial(39, 7) - binomial(33, 7) was found for y >= 5. No other exceptions were found up to k <= 10^14.
FORMULA
a(n) = 98*a(n - 2) - a(n - 4) for n >= 5, with a(1) = 21, a(2) = 119, a(3) = 2059, a(4) = 11661.
a(n) = A216073(n + 1)*A080806(n + 1).
G.f.: x*(21 + 119*x + x^2 - x^3)/(1 - 98*x^2 + x^4).
EXAMPLE
a(1) = 21 because binomial(5 + 4, 5) - binomial(5, 5) = binomial(9, 5) - 1 = 126 - 1 = 125 = 21^2.
MAPLE
A396689 := proc(n) option remember;
`if`(n = 1, 21, `if`(n = 2, 119, `if`(n = 3, 2059, `if`(n = 4, 11661, 98*A396689(n - 2) - A396689(n - 4)))));
end proc:
seq(A396689(n), n = 1 .. 20);
MATHEMATICA
LinearRecurrence[{0, 98, 0, -1}, {21, 119, 2059, 11661}, 20] (* Amiram Eldar, Jun 23 2026 *)
CROSSREFS
Sequence in context: A079417 A267877 A183318 * A204214 A074088 A245031
KEYWORD
nonn,easy,changed
AUTHOR
Felix Huber, Jun 23 2026
STATUS
approved