OFFSET
0,4
COMMENTS
After the initial zero, sequence contains only terms of A132141, each appearing exactly twice.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..59048
FORMULA
a(n) = min(n, A004488(n)).
PROG
(PARI) A330740(n) = min(n, subst(Pol(apply(x->(3-x)%3, digits(n, 3)), 'x), 'x, 3));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 11 2020
STATUS
approved