OFFSET
1,1
COMMENTS
LINKS
FORMULA
a(n) = n^2 - 2*n - 27.
G.f.: -(4-3*x)*(7-9*x)/(1-x)^3.
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: exp(x)*(x^2 - x - 27) + 27.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)
EXAMPLE
For k = -19, k + 28 = 9 = 3^2 is a square.
For k = -3, k + 28 = 25 = 5^2 is a square.
For k = 21, k + 28 = 49 = 7^2 is a square.
MATHEMATICA
Range[0, 50]^2-28 (* or *) LinearRecurrence[{3, -3, 1}, {-28, -27, -24}, 50] (* Harvey P. Dale, May 15 2023 *)
PROG
(Magma) [ n: n in [ -30..2500] | IsSquare(n+28) ];
(PARI) a(n)=n^2-2*n-27 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
sign,easy,changed
AUTHOR
Klaus Brockhaus, Jan 21 2009
STATUS
approved