1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
public static int p(int n) { if (n == 3) return 1; else if (n == 2) return 0; else return (n + (n+1) + p(n-1)); }