login
Positive integers whose ternary representation includes at least one 1, and every 1 is followed by 0.
5

%I #14 Mar 16 2024 21:41:23

%S 3,9,11,21,27,29,30,33,35,57,63,65,75,81,83,84,87,89,90,92,99,101,102,

%T 105,107,165,171,173,183,189,191,192,195,197,219,225,227,237,243,245,

%U 246,249,251,252,254,261,263,264,267,269,270,272,273,276,278,297

%N Positive integers whose ternary representation includes at least one 1, and every 1 is followed by 0.

%e The ternary representations of 3, 9, and 11 are 10, 100, and 102.

%t Map[#[[1]] &, Select[Map[{#, #[[1]] > 0 && #[[1]] == #[[2]] &[{Length[

%t StringCases[#, "1"]], Length[StringCases[#, "10"]]}] &[

%t IntegerString[#, 3]]} &, Range[500]], #[[2]] &]]

%t (* _Peter J. C. Moses_, Mar 05 2024 *)

%Y Cf. A007089, A081606.

%Y Cf. A370916, A370917, A370919, A370920, A370921, A370922, A370923.

%K nonn,base

%O 1,1

%A _Clark Kimberling_, Mar 15 2024