OFFSET
0,1
COMMENTS
Any square mod 13 is one of 0, 1, 3, 4, 9, 10 or 12 (A010376) but not 5, for this reason there are no squares in sequence. - Bruno Berselli, Feb 19 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
From Vincenzo Librandi, Feb 26 2012: (Start)
G.f.: (5+8*x)/(1-x)^2.
a(n) = 2*a(n-1) - a(n-2). (End)
E.g.f.: (5 + 13*x)*exp(x). - G. C. Greubel, May 31 2024
MATHEMATICA
Range[5, 1000, 13] (* Vladimir Joseph Stephan Orlovsky, May 31 2011 *)
CoefficientList[Series[(8 x + 5)/(1 - x)^2, {x, 0, 60}], x] (* Vincenzo Librandi, Feb 26 2012 *)
PROG
(PARI) a(n)=13*n+5 \\ Charles R Greathouse IV, Dec 28 2011
(Magma) I:=[5, 18]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, Feb 26 2012
(SageMath) [13*n+5 for n in range(61)] # G. C. Greubel, May 31 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 15 2009
STATUS
approved