human
Find the number of binary strings of length N with at least 3 consecutive 1 s | Function to return the count of required strings.
'0' at ith position.
'1' at ith position.
Driver code.
Base condition : 2 ^ ( i + 1 ) because of 0 indexing"
Solution in Python:

=====
Write me a code to find the number of binary strings of length N with at least 3 consecutive 1 s and the other steps required?
assistant
#Here is code to find the number of binary strings of length N with at least 3 consecutive 1 s and the other steps required.
 def solve ( i , x , dp ) :
	if ( i < 0 ) :
		return x == 3
	if ( dp [ i ] [ x ] != - 1 ) :
		return dp [ i ] [ x ]
	dp [ i ] [ x ] = solve ( i - 1 , 0 , dp )
	dp [ i ] [ x ] += solve ( i - 1 , x + 1 , dp )
	return dp [ i ] [ x ]
if __name__ == " _ _ main _ _ " :
	n = 4 ;
	dp = [ [ 0 for i in range ( n ) ] for j in range ( 4 ) ]
	for i in range ( n ) :
		for j in range ( 4 ) :
			dp [ i ] [ j ] = - 1
	for i in range ( n ) :
		dp [ i ] [ 3 ] = ( 1 << ( i + 1 ) )
	print ( solve ( n - 1 , 0 , dp ) )