login
A367606
Comma-successor to n working in base 3, but written in base 10, or -1 if n has no successor.
5
5, 9, 4, -1, 12, 8, 11, 15, 10, 14, 19, 13, 17, 22, 16, 21, 25, 20, 24, 27, 23, -1, 30, 26, 29, 33, 28, 32, 36, 31, 35, 39, 34, 38, 42, 37, 41, 45, 40, 44, 48, 43, 47, 51, 46, 50, 55, 49, 53, 58, 52, 57, 61, 56, 60, 64, 59, 63, 67, 62, 66, 70, 65, 69, 73, 68, 72, 76, 71, 75, 79, 74, 78, 81, 77, -1, 84, 80, 83, 87, 82
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
This is true for A168613(n), n >= 2. See proofs in A367341. - Michael S. Branicky, Dec 15 2023
LINKS
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
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 11 2023
STATUS
approved