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.
LINKS
Felix Huber, Table of n, a(n) for n = 1..999
Index entries for linear recurrences with constant coefficients, signature (0,98,0,-1).
FORMULA
EXAMPLE
a(1) = 21 because binomial(5 + 4, 5) - binomial(5, 5) = binomial(9, 5) - 1 = 126 - 1 = 125 = 21^2.
MAPLE
MATHEMATICA
LinearRecurrence[{0, 98, 0, -1}, {21, 119, 2059, 11661}, 20] (* Amiram Eldar, Jun 23 2026 *)
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Felix Huber, Jun 23 2026
STATUS
approved
