cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A352891 Number of iterations of map x -> A341515(x) needed to reach x < n when starting from x=n, or 0 if such number is never reached. Here A341515 is the Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

0, 0, 1, 6, 1, 3, 1, 11, 1, 3, 1, 9, 1, 7, 1, 11, 1, 3, 1, 6, 1, 6, 1, 9, 1, 11, 1, 7, 1, 1, 1, 91, 1, 106, 1, 5, 1, 16, 1, 14, 1, 4, 1, 7, 1, 20, 1, 89, 1, 3, 1, 7, 1, 3, 1, 87, 1, 21, 1, 1, 1, 50, 1, 92, 1, 5, 1, 18, 1, 3, 1, 8, 1, 98, 1, 14, 1, 5, 1, 14, 1, 34, 1, 6, 1, 35, 1, 12, 1, 2, 1, 21, 1, 71, 1, 90, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 08 2022

Keywords

Comments

This is one possible analog for A102419 ("Dropping time" sequence) when computed for A341515. See also A352894.

Crossrefs

Programs

  • 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));
    A352891(n) = if(n<=2, 0, my(k=0,x=n); while(x>=n, x = A341515(x); k++); (k));

Formula

For n >= 1, a(2n+1) = 1.
For n >= 1, A352894(n) <= a(n) <= A352890(n).