>it would interest me to see this as a macro
This isn't what I would call macro material, but yes, it can be done:
Code:
#define A(n,r) \
do { \
    int i, y = 2, z = 1; \
    if( n <= 1 ) \
        r = n+1; \
    else { \
        for( i=2; i<=n; i++ ) { \
            r = 2*y - 3*z; \
            z = y; \
            y = r; \
        } \
    } \
} while ( 0 )