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”).

A370921
Positive integers in whose ternary representation, 2 occurs at least once, and every 2 is followed by 1.
5
7, 16, 21, 22, 34, 43, 48, 49, 63, 64, 66, 67, 70, 88, 97, 102, 103, 115, 124, 129, 130, 144, 145, 147, 148, 151, 189, 190, 192, 193, 196, 198, 199, 201, 202, 205, 210, 211, 250, 259, 264, 265, 277, 286, 291, 292, 306, 307, 309, 310, 313, 331, 340, 345, 346
OFFSET
1,1
EXAMPLE
The ternary representations of 7, 16, and 21 are 21, 121, and 210.
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, #[[1]] > 0 && #[[1]] == #[[2]] &[{Length[
StringCases[#, "2"]], Length[StringCases[#, "21"]]}] &[
IntegerString[#, 3]]} &, Range[500]], #[[2]] &]]
(* Peter J. C. Moses, Mar 05 2024 *)
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 16 2024
STATUS
approved