OFFSET
1,1
COMMENTS
These are the solutions s (together with some k) of the Diophantine equation 1 + ... + k = (k+7) + ... + (k+7 + s) for k >= 1 and s >= 0, since that becomes k = ((2*s+1) + sqrt(8*s^2 + 64*s + 57)) / 2 which is an integer iff 8*s^2 + 64*s + 57 is a square (an odd square).
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,6,-6,-1,1).
FORMULA
From Elmo R. Oliveira, May 12 2026: (Start)
G.f.: x*(4 + 2*x + 11*x^2 - x^4) / ((1-x) * (1-2*x-x^2) * (1+2*x-x^2)).
a(n) = a(n-1) + 6*a(n-2) - 6*a(n-3) - a(n-4) + a(n-5) for n > 5. (End)
EXAMPLE
For s = 4: 8*4^2 + 64*4 + 57 = 21^2, thus 4 is a term.
MATHEMATICA
LinearRecurrence[{1, 6, -6, -1, 1}, {4, 6, 41, 53, 258}, 30] (* Hugo Pfoertner, Aug 31 2025 *)
PROG
(PARI) is_a387469(s) = issquare(8*s^2+64*s+57) \\ Hugo Pfoertner, Aug 30 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ctibor O. Zizka, Aug 30 2025
EXTENSIONS
More terms from Hugo Pfoertner, Aug 31 2025
STATUS
approved
