|
|
A344853
|
|
a(n) = n minus (sum of digits of n in base 3).
|
|
3
|
|
|
0, 0, 0, 2, 2, 2, 4, 4, 4, 8, 8, 8, 10, 10, 10, 12, 12, 12, 16, 16, 16, 18, 18, 18, 20, 20, 20, 26, 26, 26, 28, 28, 28, 30, 30, 30, 34, 34, 34, 36, 36, 36, 38, 38, 38, 42, 42, 42, 44, 44, 44, 46, 46, 46, 52, 52, 52, 54, 54, 54, 56, 56, 56, 60, 60, 60, 62, 62, 62
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
a(3*n) = a(3*n+1) = a(3*n+2).
|
|
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
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|