OFFSET
1,1
COMMENTS
Numbers n such that n == 11 or 50 (mod 61).
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.: x*(11 + 39*x + 11*x^2)/((1 + x)*(1 - x)^2).
a(n) = a(n-1) + a(n-2) - a(n-3) for n>2.
a(n) = a(n-2) + 61 for all n>2.
a(n) = -11*(-1)^n + 61*floor(n/2).
MATHEMATICA
Select[Range[1500], PowerMod[#, 2, 61] == 60 &] (* or *) CoefficientList[Series[(11 + 39 x + 11 x^2)/((1 + x) (1 - x)^2), {x, 0, 100}], x]
PROG
(Magma) I:=[11, 50, 72]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]];
(Magma) [-11*(-1)^n+61*Floor(n/2): n in [1..50]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Apr 25 2014
STATUS
approved