login
A370920
Positive integers in whose ternary representation 2 occurs at least once, and every 2 is followed by 0.
5
6, 15, 18, 19, 33, 42, 45, 46, 54, 55, 57, 58, 60, 87, 96, 99, 100, 114, 123, 126, 127, 135, 136, 138, 139, 141, 162, 163, 165, 166, 168, 171, 172, 174, 175, 177, 180, 181, 249, 258, 261, 262, 276, 285, 288, 289, 297, 298, 300, 301, 303, 330, 339, 342, 343
OFFSET
1,1
FORMULA
The ternary representations of 6, 15, and 18 are 20, 120, and 200.
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, #[[1]] > 0 && #[[1]] == #[[2]] &[{Length[
StringCases[#, "2"]], Length[StringCases[#, "20"]]}] &[
IntegerString[#, 3]]} &, Range[500]], #[[2]] &]] (* Peter J. C. Moses, Mar 05 2024 *)
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 16 2024
STATUS
approved