OFFSET
0,3
FORMULA
G.f.: -x*(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 - 2*floor(n/10). [Bruno Berselli, Jun 24 2014]
MAPLE
A081599 := proc(n)
local x, y ;
x := floor(n/10) ;
y := modp(n, 10) ;
8*x+y ;
end proc:
seq(A081599(n), n=0..100) ; # R. J. Mathar, May 25 2023
MATHEMATICA
Table[n-2*Floor[n/10], {n, 0, 80}] (* Harvey P. Dale, Nov 07 2017 *)
PROG
(PARI) my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 8*x+y) \\ Colin Barker, Jun 24 2014
(Magma) k:=8; [n-(10-k)*Floor(n/10): n in [0..100]]; // Bruno Berselli, Jun 24 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 22 2003
STATUS
approved