int f(int x) { if ((x >= 2) && (x <= 4)) { return 1; } else { return f(x-1) + f(x-3); } } System.out.println(f(6));