%I #27 Jul 28 2024 09:21:33
%S 5,9,4,-1,12,8,11,15,10,14,19,13,17,22,16,21,25,20,24,27,23,-1,30,26,
%T 29,33,28,32,36,31,35,39,34,38,42,37,41,45,40,44,48,43,47,51,46,50,55,
%U 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
%N Comma-successor to n working in base 3, but written in base 10, or -1 if n has no successor.
%C This is a base-3 analog of A367338.
%C It seems that the indices of the terms equal to -1 are in A168613. - _Ivan N. Ianakiev_, Dec 12 2023
%C This is true for A168613(n), n >= 2. See proofs in A367341. - _Michael S. Branicky_, Dec 15 2023
%H Michael S. Branicky, <a href="/A367606/b367606.txt">Table of n, a(n) for n = 1..10000</a>
%o (Python)
%o from sympy.ntheory.factor_ import digits
%o def a(n):
%o b = n + 3*(n%3)
%o return next((b+y for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
%o print([a(n) for n in range(1, 82)]) # _Michael S. Branicky_, Dec 11 2023
%Y Cf. A121085, A168613, A367338, A367341, A367355, A367356, A367607, A367608, A367609.
%K sign,base
%O 1,1
%A _N. J. A. Sloane_, Dec 11 2023