number theory – solving two variables for n related to Collatz's conjecture


For this code, for each x, I want to solve all ranges of values ​​for c1 and c2 in a limited range, ie. C1 and c2 in the range of real numbers + -100 for c1 and c2 for each x, which gives "Length (stepsForEachN) == nRangeToCheck – 1". Here is the code up to now, I'm not sure how to solve both variables c1 and c2 for each x:

(*stepsForEachN output is A006577={1,7,2,5,8,16,3,19} if c1=c2=1*)
c1 = 1; 
c2 = 1;
nRangeToCheck = 10;
stepsForEachNwithIndex = {};
stepsForEachN = {};
stepsForEachNIndex = {};
maxStepsToCheck = 10000;

c1ValuesForEachN = {};

For(x = 2, x <= nRangeToCheck, x++,

 n = x;

 For(i = 1, i <= maxStepsToCheck, i++,
  If(EvenQ(n), n = Floor((n/2)*c1),
   If(OddQ(n), n = Floor((3*n + 1)*c2))
   );

  If(n < 1.9,
   AppendTo(stepsForEachN, i);
   AppendTo(stepsForEachNIndex, x);
   AppendTo(stepsForEachNwithIndex, {x, i});
   i = maxStepsToCheck + 1
   )
  )
 )
Length(stepsForEachN) == nRangeToCheck - 1