OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
FORMULA
G.f.: -x*(3*x^9 -x^8 -x^7 -x^6 -x^5 -x^4 -x^3 -x^2 -x -1) / ((x -1)^2*(x +1)*(x^4 -x^3 +x^2 -x +1)*(x^4 +x^3 +x^2 +x +1)). - Colin Barker, Jun 24 2014
a(n) = n - 4*floor(n/10). [Bruno Berselli, Jun 24 2014]
a(n) = a(n-1) + a(n-10) - a(n-11) for n > 10. - Chai Wah Wu, Apr 25 2017
MAPLE
MATHEMATICA
CoefficientList[Series[-x (3 x^9 - x^8 - x^7 - x^6 - x^5 - x^4 - x^3 - x^2 - x - 1)/((x - 1)^2 (x + 1) (x^4 - x^3 + x^2 - x + 1) (x^4 + x^3 + x^2 + x + 1)), {x, 0, 150}], x] (* Vincenzo Librandi, Jun 25 2014 *)
PROG
(PARI) my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 6*x+y) \\ Colin Barker, Jun 24 2014
(Magma) k:=6; [n-(10-k)*Floor(n/10): n in [0..10]]; // Bruno Berselli, Jun 24 2014
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 22 2003
STATUS
approved