login
A367609
Comma-number associated with A367607(n), and written in base 3, or -1 if A367607(n) = -1.
5
11, 21, 1, -1, 21, 2, 11, 21, 1, 11, 22, 1, 11, 22, 1, 12, 22, 2, 12, 21, 2, -1, 21, 2, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 22, 1, 11, 22, 1, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 21, 2, -1, 21, 2, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11
OFFSET
1,1
COMMENTS
This is a base-3 analog of A367339.
LINKS
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
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 11 2023
STATUS
approved