OFFSET
1,1
REFERENCES
Albert H. Beiler, Recreations in the Theory of Numbers: The Queen of Mathematics Entertains at 203, 315 (2d ed. 1966)
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(1) = 534, a(2) = 659, a(3) = 1727, a(n) = a(n-1) +a(n-2) -a(n-3). - Harvey P. Dale, Oct 22 2012
From Colin Barker, Aug 07 2013: (Start)
a(n) = (-1193 -943*(-1)^n +2386*n)/4.
G.f.: x*(534*x^2+125*x+534) / ((x-1)^2*(x+1)). (End)
E.g.f.: (943*exp(-x) + 1193*(1 + 2*x)*exp(x))/4. - Ilya Gutkovskiy, Apr 21 2016
EXAMPLE
1727^2 = 2982529, and 2982529 divided by 1193 leaves a remainder of 29
MATHEMATICA
Sqrt[ # ]&/@Select[Range[20000]^2, Mod[ #, 1193]==29&]
LinearRecurrence[{1, 1, -1}, {534, 659, 1727}, 40] (* Harvey P. Dale, Oct 22 2012 *)
Select[Range[25000], PowerMod[#, 2, 1193]==29&] (* Harvey P. Dale, Apr 29 2015 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Harvey P. Dale, Oct 03 2009
EXTENSIONS
More terms from Colin Barker, Aug 07 2013
STATUS
approved