// hat Collatz-Folge von x die Länge len?
static boolean collatz_test (int x, int len) {
int count = 0; // Deklaration mit Initialisierung
while (x > 1) {
if (0 == x % 2) {
x = x / 2;
} else {
x = 3 * x + 1;
}
count++;
}
return len == count;
}