OFFSET
0,4
COMMENTS
a(n) is even.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..20000
FORMULA
a(n) = n - A030102(n).
EXAMPLE
For n = 5, the reversal of base 3 digits of n (written in base 10) is 7. So, a(5) = 5 - 7 = -2. - Indranil Ghosh, Feb 01 2017
MATHEMATICA
Table[n-FromDigits[Reverse[IntegerDigits[n, 3]], 3], {n, 0, 90}] (* Harvey P. Dale, May 14 2022 *)
PROG
(PARI) a(n) = n - fromdigits(Vecrev(digits(n, 3)), 3); \\ Michel Marcus, Aug 09 2019
CROSSREFS
KEYWORD
base,sign
AUTHOR
Henry Bottomley, Jul 18 2000
STATUS
approved