static int isPascal(int n) { int sum = 0; int nthVal = 1; while (sum < n) { sum = sum + nthVal; nthVal++; } return sum == n ? 1 :