I think you can solve that by building a tree.
On each node you have a list of values. Assuming the sum of this list is less than the required sum - let's call it S -, you can build at most three children for this node: one by adding 1 to the list of this node, one by adding 2 and one by adding 3. The condition to build a child would be that the sum of the new list would still be less that S.
At the end, i.e. when you can't generate new nodes, you have all your sequences in the nodes of your tree.
EDIT: in C# my poor explanation would give sth like that:
first:
public class Node
{
public Node()
{
Children = new List<Node>();
}
public static int SumMax { get; set; }
public List<int> Values { get; set; }
public List<Node> Children { get; set; }
public void AddChild(int data)
{
if (Values.Sum() + data < SumMax)
{
Node child = new Node();
child.Values = new List<int>(Values);
child.Values.Add(data);
Children.Add(child);
for (int = data; i < 4; i++)
{
child.AddChild(i);
}
}
}
public void FillSequences(List<List<int>> sequences)
{
if (Values.Count != 0)
{
sequences.Add(Values);
}
foreach (Node child in Children)
{
child.FillSequences(sequences);
}
}
}
then the main:
void Main()
{
Node.SumMax = 10;
Node root = new Node();
root.Values = new List<int>();
for (int i = 1; i < 4; i++)
root.AddChild(i);
List<List<int>> sequences = new List<List<int>>();
root.FillSequences(sequences);
//here you've got your sequences results in "sequences" and you can do what you want
}
I don't know if it is standard enough but it does roughly the job. I hope it fits your need...
EDIT: to avoid the generation of same sequences, we can "order" the tree: a node can't generate a child with a lower value than its one. Thus, in the AddChild method, we start the loop at "data" and not at 1.