OFFSET
0,4
COMMENTS
All terms are even.
In all sequences of the form f(n) = n minus (sum of digits of n in base b), every term appears b times consecutively. Here b = 3, hence terms are entries of A346502 repeated 3 times. - Bernard Schott, Jul 21 2021
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
a(20) = 20 - (2 + 0 + 2) = 16 because 20 is written as 202 in base 3.
MATHEMATICA
a[n_] := n - Plus @@ IntegerDigits[n, 3]; Array[a, 70, 0] (* Amiram Eldar, May 30 2021 *)
PROG
(PARI) a(n) = n - sumdigits(n, 3); \\ Michel Marcus, Jul 11 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Thomas König, May 30 2021
STATUS
approved