OFFSET
1,1
COMMENTS
This is a base-3 analog of A367338.
It seems that the indices of the terms equal to -1 are in A168613. - Ivan N. Ianakiev, Dec 12 2023
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((b+y for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Dec 11 2023
CROSSREFS
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 11 2023
STATUS
approved