OFFSET
1,2
COMMENTS
Numbers k that are == +-1 (mod 9) and == +-1 (mod 32). - Charles R Greathouse IV, Dec 23 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
G.f.: (-x^4 + 2*x^3 + 126*x^2 + 34*x + 127)/(x^5 - x^4 - x + 1). - Alexander R. Povolotsky, Feb 15 2009
a(n) = -36 + 27*(-1)^n + (4-4*i)*(-i)^n + (4+4*i)*i^n + 72*n. - Harvey P. Dale, Apr 25 2012
Sum_{n>=1} (-1)^(n+1)/a(n) = (cot(Pi/288) - tan(17*Pi/288))*Pi/288. - Amiram Eldar, Feb 26 2023
E.g.f.: 1 + 8*cos(x) + 9*(8*x - 1)*cosh(x) - 8*sin(x) + 9*(8*x - 7)*sinh(x). - Stefano Spezia, Oct 13 2024
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, -1}, {1, 127, 161, 287, 289}, 50] (* Vincenzo Librandi, Feb 08 2012 *)
With[{c=24^2}, Select[Range[3200], Divisible[#^2-1, c]&]] (* Harvey P. Dale, Apr 25 2012 *)
PROG
(PARI) a(n)=n\4*288+[-1, 1, 127, 161][n%4+1]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 13 2009
EXTENSIONS
Corrected and edited by Vinay Vaishampayan, Jun 23 2010
STATUS
approved