OFFSET
1,1
COMMENTS
This is a base-3 analog of A367339.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, The Comma Sequence: A Simple Sequence With Bizarre Properties, arXiv:2401.14346, Youtube
PROG
(Python)
from sympy.ntheory.factor_ import digits
def a(n):
b = n + 3*(n%3)
return next((int("".join(map(str, digits(b+y-n, 3)[1:]))) for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Dec 11 2023
CROSSREFS
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 11 2023
STATUS
approved