login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A043307
a(n) = A033001(n)/4.
15
1, 2, 9, 11, 18, 19, 82, 83, 99, 100, 163, 164, 171, 173, 738, 740, 747, 748, 892, 893, 900, 902, 1467, 1469, 1476, 1477, 1540, 1541, 1557, 1558, 6643, 6644, 6660, 6661, 6724, 6725, 6732, 6734, 8028, 8030, 8037, 8038, 8101, 8102, 8118, 8119
OFFSET
1,2
COMMENTS
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
LINKS
FORMULA
From Robert Israel, Jan 29 2017: (Start)
If a(n) == 0 (mod 3) then a(2*n+1) = 9*a(n) + 1 else a(2*n+1) = 9*a(n).
If a(n) == 2 (mod 3) then a(2*n+2) = 9*a(n) + 1 else a(2*n+1) = 9*a(n)+2.
a(4k+5) = 9*a(2k+2).
(End)
MAPLE
A[1]:= [1, 2]:
for d from 2 to 6 do
A[d]:= map(t -> seq(9*t+j, j=subs(t mod 9 = NULL, [0, 1, 2])), A[d-1])
od:
seq(op(A[d]), d=1..6); # Robert Israel, Jan 29 2017
MATHEMATICA
Table[FromDigits[#, 9]&/@Select[Tuples[{0, 1, 2}, n], Min[Abs[Differences[#]]]>0&], {n, 2, 5}]// Flatten// Union (* Harvey P. Dale, May 27 2023 *)
PROG
(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
(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
CROSSREFS
KEYWORD
nonn,base
STATUS
approved