OFFSET
1,1
COMMENTS
This is a base-3 analog of A367338.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(Python)
from sympy.ntheory.factor_ import digits
def a(n):
b = n + 3*(n%3)
return next((int("".join(map(str, d3))) for y in [1, 2] if (d3:=digits(b+y, 3)[1:])[0] == y), -1)
print([a(n) for n in range(1, 61)]) # Michael S. Branicky, Dec 11 2023
CROSSREFS
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 11 2023
STATUS
approved