Here's what i would have done:
Code:
int A( int n )
{
	int i, x, y = 2, z = 1;

	if( n <= 1 )
		x = n+1;
	else
	for( i=2; i<=n; i++ ) {
		x = 2*y - 3*z;
		z = y;
		y = x;
	}

	return x;
}
Hope that helps you.