A258821 Least number k such that A258772(k) = n.
2, 1, 12, 187561
Offset: 0
Examples
T(12) = [12, 6, 3, 10, 5, 16, 8, 4, 2, 1]. The numbers 3 and 5 are in the 3rd and 5th position, respectively. Since 12 is the smallest number to have exactly two fixed points, a(2) = 12. Note that the length of this trajectory is 10. For all other trajectories with exactly 2 fixed points, the length is either 47 or 48.
Programs
-
PARI
Tvect(n)=v=[n]; while(n!=1, if(n%2, k=3*n+1; v=concat(v, k); n=k); if(!(n%2), k=n/2; v=concat(v, k); n=k)); v n=0; m=1; while(m<10^3, d=Tvect(m); c=0; for(i=1, #d, if(d[i]==i, c++)); if(c==n, print1(m,", "); m=0; n++); m++)
Comments