OFFSET
1,1
COMMENTS
Numbers k such that k = 156 or 373 (mod 529). - Charles R Greathouse IV, Dec 27 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
Conjecture: a(n) = a(n-1) + a(n-2) - a(n-3) = 529*n/2 - 529/4 - 95*(-1)^n/4. - R. J. Mathar, Oct 18 2010
The conjecture is correct. - Charles R Greathouse IV, Dec 27 2011
G.f.: x*(156+217*x+156*x^2)/(1-x-x^2+x^3). - Colin Barker, Jan 16 2012
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(217*Pi/1058)*Pi/529. - Amiram Eldar, Feb 26 2023
EXAMPLE
156^2 - 2 == 0 (mod 23^2).
373^2 - 2 == 0 (mod 23^2).
685^2 - 2 == 0 (mod 23^2).
10424^2 - 2 == 0 (mod 23^2).
MATHEMATICA
With[{c=23^2}, Select[Range[20000], PowerMod[#, 2, c]==2&]] (* or *) LinearRecurrence[{1, 1, -1}, {156, 373, 685}, 80] (* Harvey P. Dale, Oct 13 2014 *)
PROG
(PARI) a(n)=529*n/2-529/4-95*(-1)^n/4 \\ Charles R Greathouse IV, Dec 27 2011
(Magma) [(1058*n-529-95*(-1)^n)/4: n in [1..50]]; // Vincenzo Librandi, Jan 12 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 17 2009
EXTENSIONS
Checked by Joerg Arndt, Jun 16 2010
STATUS
approved