OFFSET
1,1
COMMENTS
Also, numbers k such that k^2 == -1 (mod 53).
The first pair (a,b) is such that a+b=p=53, a*b=p*h+1, with h<=(p-1)/4; subsequent pairs are given as (a+kp, b+kp), k=1,2,3...
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
a(n) = 23*(-1)^(n+1) + 53*floor(n/2). - M. F. Hasler, Jun 16 2010
a(2k+1) = 53 k + a(1), a(2k) = 53 k - a(1), with a(1) = 23 = A002314(7) since 53 = A002144(7). - M. F. Hasler, Jun 16 2010
a(n) = a(n-2) + 53 for all n > 2. - M. F. Hasler, Jun 16 2010
From R. J. Mathar, Feb 19 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) = 53*n/2 - 53/4 - 39*(-1)^n/4.
G.f.: x*(23 + 7*x + 23*x^2)/((1+x)*(1-x)^2). (End)
MATHEMATICA
Select[Range[1300], PowerMod[#, 2, 53] == 52 &] (* or *) LinearRecurrence[ {1, 1, -1}, {23, 30, 76}, 50] (* Harvey P. Dale, Nov 30 2011 *)
CoefficientList[Series[(23 + 7 x + 23 x^2)/((1 + x) (1 - x)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Apr 24 2014 *)
PROG
(PARI) A155107(n)=n\2*53-23*(-1)^n /* M. F. Hasler, Jun 16 2010 */
(Magma) I:=[23, 30, 76]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]] /* or */ [-23*(-1)^n+53*Floor(n/2): n in [1..50]]; // Vincenzo Librandi, Apr 24 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 20 2009
EXTENSIONS
Terms checked & minor edits by M. F. Hasler, Jun 16 2010
STATUS
approved