#K15256. Modified Fibonacci Series
Modified Fibonacci Series
Modified Fibonacci Series
We define a modified Fibonacci series where the first three numbers are given as (1,\ 2,\ 3), and each subsequent number is the sum of the previous three numbers. That is, the recurrence relation is: [ a_n = a_{n-1} + a_{n-2} + a_{n-3}, \quad \text{for } n > 3, ] Given an integer (m) (with (m \geq 3)) as input, your task is to output the first (m) numbers of this series. The output should be a single line with the numbers separated by a space.
inputFormat
The input consists of a single integer (m) provided via standard input.
outputFormat
Output the first (m) numbers of the modified Fibonacci series on one line, with each number separated by a space.## sample
5
1 2 3 6 11
</p>