%I #22 May 27 2023 18:53:58
%S 1,2,9,11,18,19,82,83,99,100,163,164,171,173,738,740,747,748,892,893,
%T 900,902,1467,1469,1476,1477,1540,1541,1557,1558,6643,6644,6660,6661,
%U 6724,6725,6732,6734,8028,8030,8037,8038,8101,8102,8118,8119
%N a(n) = A033001(n)/4.
%C Also: Numbers which, written in base 9, have only digits 0, 1 or 2, and no two adjacent digits equal. - _M. F. Hasler_, Feb 03 2014
%H Robert Israel, <a href="/A043307/b043307.txt">Table of n, a(n) for n = 1..10000</a>
%F From _Robert Israel_, Jan 29 2017: (Start)
%F If a(n) == 0 (mod 3) then a(2*n+1) = 9*a(n) + 1 else a(2*n+1) = 9*a(n).
%F If a(n) == 2 (mod 3) then a(2*n+2) = 9*a(n) + 1 else a(2*n+1) = 9*a(n)+2.
%F a(4k+5) = 9*a(2k+2).
%F (End)
%p A[1]:= [1,2]:
%p for d from 2 to 6 do
%p A[d]:= map(t -> seq(9*t+j,j=subs(t mod 9 = NULL, [0,1,2])), A[d-1])
%p od:
%p seq(op(A[d]),d=1..6); # _Robert Israel_, Jan 29 2017
%t Table[FromDigits[#,9]&/@Select[Tuples[{0,1,2},n],Min[Abs[Differences[#]]]>0&],{n,2,5}]// Flatten// Union (* _Harvey P. Dale_, May 27 2023 *)
%o (PARI) is_A043307(n)=(n=[n])&&!until(!n[1],((n=divrem(n[1],9))[2]<3 && n[1]%3!=n[2])||return) \\ _M. F. Hasler_, Feb 03 2014
%o (PARI) a(n) = my(v=binary(n+1)); v[1]=0; for(i=2,#v, v[i]+=(v[i]>=v[i-1])); fromdigits(v,9); \\ _Kevin Ryde_, Mar 13 2021
%Y Cf. A043308 - A043320, A043291, A033001 - A033014, A033016 - A033029.
%K nonn,base
%O 1,2
%A _Clark Kimberling_