human
Sylvester 's sequence | Python Code for Sylvester sequence.
To store the product ..
To store the current number ..
Loop till n ..
Driver program to test above function"
Solution in Python:
 Give me a code to sylvester 's sequence and the other steps required?
assistant
#Here is code to sylvester 's sequence and the other steps required.
 def printSequence ( n ) :
a = 1
ans = 2
	N = 1000000007
	i = 1
	while i <= n :
		print ans ,
		ans = ( ( a % N ) * ( ans % N ) ) % N
		a = ans
		ans = ( ans + 1 ) % N
		i = i + 1
n = 6
printSequence ( n )