OFFSET
0,3
COMMENTS
Nonnegative integers m such that floor(2*m^2/10) = 2*floor(m^2/10). [Bruno Berselli, Dec 08 2015]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
G.f.: x*(1 + x + 6*x^2 + x^3 + x^4)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)). [Bruno Berselli, Feb 08 2014]
a(n) = a(n-1)+a(n-5)-a(n-6). - Vincenzo Librandi, Feb 12 2014
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 1, 2, 8, 9, 10}, 70] (* Bruno Berselli, Feb 08 2014 *)
CoefficientList[Series[x (1 + x + 6 x^2 + x^3 + x^4)/((1 - x)^2 (1 + x + x^2 + x^3 + x^4)), {x, 0, 100}], x] (* Vincenzo Librandi, Feb 12 2014 *)
NestList[If[Mod[#, 10]==2, FromDigits[Join[Most[IntegerDigits[#]], {8}]], #+ 1]&, 0, 100] (* Harvey P. Dale, Feb 21 2016 *)
PROG
(Magma) I:=[0, 1, 2, 8, 9, 10]; [n le 6 select I[n] else Self(n-1)+Self(n-5)-Self(n-6): n in [1..80]]; // Vincenzo Librandi, Feb 12 2014
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Feb 07 2014
EXTENSIONS
Definition by N. J. A. Sloane, Feb 07 2014
STATUS
approved