OFFSET
1,1
COMMENTS
Least k such that A006577(k) = k/n, or -1.
By definition, k is divisible by n. - Ralf Stephan, Sep 01 2003
The sequence (with question marks for the unknown values) begins 5, 2, 21, 16, 40, 120, 238, 96, 261, 150, ?, 288, 767, 2002, 405, 160, 170, 2016, ?, 1980, 693, 1078, 2645, ?, 625, 650, ?, 784, ?, ...
For n in {11, 19, 24, 27, 29, 35, 37, 38, 45, 46}, if k exists, it is greater than 10^7. - David A. Corneth, Jan 29 2022
EXAMPLE
a(3) = 21 as the Collatz trajectory of 21 is 21 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1 which takes 7 steps. 21/7 = 3 and 21 is the smallest k such that k/3 is the number of steps in the Collatz trajectory. - David A. Corneth, Jan 29 2022
PROG
(PARI) a(n)=if(n<0, 0, k=n; while(abs(if(k<0, 0, s=k; c=1; while((1-(s%2))*s/2+(s%2)*(3*s+1)>1, s=(1-(s%2))*s/2+(s%2)*(3*s+1); c++); c)-k/n)>0, k=k+n); k)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 29 2002
EXTENSIONS
More terms from Ralf Stephan, Sep 01 2003
a(1) = 5 prepended by David A. Corneth, Jan 29 2022
Edited by N. J. A. Sloane, Jan 29 2022
STATUS
approved