Here is a Python function that generates a Fibonacci sequence:

```python
def fibonacci(n):
    """
    Generates a Fibonacci sequence up to `n` using the formula:
    `F(n) = F(n-1) + F(n-2)`
    """
    if n <= 1:
        return n
    return fibonacci(n-1) + fibonacci(n-2)
```

This function uses the `fibonacci` function to generate the Fibonacci sequence. The `fibonacci` function takes a single argument `n` and returns the next Fibonacci number. If `n` is less than 1, it returns `n` itself. Otherwise, it returns the sum of the previous two Fibonacci numbers.