%I #24 Jun 04 2022 04:31:53
%S 0,1,3,7,9,10,12,25,27,28,30,34,36,37,39,79,81,82,84,88,90,91,93,106,
%T 108,109,111,115,117,118,120,241,243,244,246,250,252,253,255,268,270,
%U 271,273,277,279,280,282,322,324,325,327,331,333,334,336,349,351,352
%N Nonnegative numbers in (3*A005836) union (3*A005836 - 2) [A005836 lists the numbers with base-3 representation containing no 2].
%C Numbers k such that the Motzkin number A001006(k) == 1 (mod 3).
%H Amiram Eldar, <a href="/A082575/b082575.txt">Table of n, a(n) for n = 1..10000</a>
%H Rob Burns, <a href="https://arxiv.org/abs/1611.04910">Asymptotic density of Motzkin numbers modulo small primes</a>, arXiv:1611.04910 [math.NT], 2016.
%t (* m = MotzkinNumber *) m[0] = 1; m[n_] := m[n] = m[n - 1] + Sum[m[k]*m[n - 2 - k], {k, 0, n - 2}]; Select[Range[0, 400], Mod[m[#], 3] == 1 &] (* _Jean-François Alcover_, Jul 10 2013 *)
%t max = 150; Sort @ Join[Select[3*Range[0, max], DigitCount[#, 3, 2] == 0 &], Select[3*Range[max] - 2, DigitCount[# + 2, 3, 2] == 0 &]] (* _Amiram Eldar_, Jun 04 2022 *)
%Y Cf. A001006, A005836, A089118, A089119.
%K nonn,base
%O 1,3
%A _Emeric Deutsch_ and _Bruce E. Sagan_, Dec 05 2003
%E Offset changed to 1 (sequence is a list) by _L. Edson Jeffery_, Nov 27 2015