OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1, 1, -1).
FORMULA
G.f.: (10*x^2 + 29*x + 10)/(x^3 - x^2 - x + 1). - Alexander R. Povolotsky, Feb 15 2009
From R. J. Mathar, Feb 19 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) = 49*n/2 - 49/4 + 9*(-1)^n/4.
G.f.: x*(2x+5)*(5x+2)/((1+x)*(1-x)^2). (End)
EXAMPLE
10^2 - 2 == 0 (mod 49);
39^2 - 2 == 0 (mod 49);
59^2 - 2 == 0 (mod 49);
88^2 - 2 == 0 (mod 49).
MATHEMATICA
With[{c = 7^2}, Select[Range[1500], Divisible[#^2 - 2, c]&]] (* Vincenzo Librandi, Apr 06 2013 *)
PROG
(Magma) [Floor(n/2)*49-10*(-1)^n: n in [1..50]]; // Vincenzo Librandi, Apr 06 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 13 2009
EXTENSIONS
Edited by N. J. A. Sloane, Feb 14 2009
STATUS
approved