Query code: 73_4_17.c

#include <stdio.h>

#define MAX 10000

int F(int a, int b, int c, int d);

int main(void)
{
    printf("%d\n", F(1, 3, 1, 2));
    return 0;
}

int F(int a, int b, int c, int d)
{
    if ((b + d) > MAX)
        return 0;
    return 1 + F(a, b, a+c, b+d) + F(a+c, b+d, c, d);
}
Results:

73_4_1.c
55_5_7.c
53_6_9.c
56_1_4.c
73_7_14.c
4_5_12.c
73_7_3.c
73_8_4.c
4_7_14.c
53_8_11.c