login
A352894
Number of iterations of map x -> A352892(x) needed to reach x < n when starting from x=n, or 0 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).
6
0, 0, 1, 2, 1, 1, 1, 4, 1, 1, 1, 3, 1, 2, 1, 4, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 35, 1, 40, 1, 2, 1, 5, 1, 5, 1, 1, 1, 2, 1, 6, 1, 34, 1, 1, 1, 2, 1, 1, 1, 33, 1, 6, 1, 1, 1, 17, 1, 35, 1, 1, 1, 6, 1, 1, 1, 3, 1, 35, 1, 4, 1, 1, 1, 5, 1, 10, 1, 3, 1, 10, 1, 4, 1, 1, 1, 6, 1, 24, 1, 34, 1, 1, 1, 2, 1
OFFSET
1,4
FORMULA
a(2n+1) = 1 for n >= 1.
For n >= 1, a(n) <= A352891(n).
For n >= 1, a(n) <= A352893(n).
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
A329603(n) = A005940(2+(3*A156552(n)));
A341515(n) = if(n%2, A064989(n), A329603(n));
A348717(n) = { my(f=factor(n)); if(#f~>0, my(pi1=primepi(f[1, 1])); for(k=1, #f~, f[k, 1] = prime(primepi(f[k, 1])-pi1+1))); factorback(f); }; \\ From A348717
A352894(n) = if(n<=2, 0, my(k=0, x=n); while(x>=n, x = A352892(x); k++); (k));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 08 2022
STATUS
approved