OFFSET
0,4
COMMENTS
In even positions there are odd terms.
The difference between n and even digits of n and n has odd and even digits gives even terms finishing with 0.
FORMULA
a(n) ~ n. a(n) = n mod 2. - Charles R Greathouse IV, Jan 28 2013
EXAMPLE
a(14) = 14 - 4 = 10.
a(28) = 28 - 2 - 8 = 18.
MATHEMATICA
Table[n-Total[Select[IntegerDigits[n], EvenQ]], {n, 0, 90}] (* Harvey P. Dale, May 20 2017 *)
PROG
(PARI) a(n) = {digs = digits(n, 10); return (n - sum(i=1, #digs, digs[i]*(1 - (digs[i] % 2)))); } \\ Michel Marcus, Jul 15 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Marco Piazzalunga, Jan 27 2013
STATUS
approved