def test_with_96234(self):
     n = 96234
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([
         1, 3, 9, 10, 11, 22, 66, 198, 594, 1782, 5346, 16038, 16039, 32078,
         96234
     ], sequence)
 def test_with_10(self):
     n = 10
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1, 3, 9, 10], sequence)
 def test_with_8(self):
     n = 8
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1, 2, 4, 8], sequence)
 def test_with_9(self):
     n = 9
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1, 3, 9], sequence)
 def test_with_7(self):
     n = 7
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1, 2, 6, 7], sequence)
 def test_with_3(self):
     n = 3
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1, 3], sequence)
 def test_with_2(self):
     n = 2
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1, 2], sequence)
 def test_with_1(self):
     n = 1
     sequence = optimal_sequence_simplified(n)
     self.assertEqual([1], sequence)
 def test_with_0(self):
     with self.assertRaisesRegex(AssertionError, ''):
         optimal_sequence_simplified(0)