Here is a Haskell function that can generate the sequence of numbers 1, 4, 13, 40, 121, 364:

sequence :: [Integer]
sequence = 1 : next sequence
  where
    next (x:xs) = (3 * x + 1) : next xs

You can call this function by passing in an empty list, and it will return a list containing the sequence of numbers.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence