login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A341516 The Collatz or 3x+1 function T (A014682) conjugated by unary-binary-encoding (A156552). 3
1, 3, 2, 6, 3, 7, 5, 12, 4, 27, 7, 14, 11, 75, 6, 24, 13, 35, 17, 54, 10, 147, 19, 28, 9, 363, 8, 150, 23, 13, 29, 48, 14, 507, 15, 70, 31, 867, 22, 108, 37, 343, 41, 294, 12, 1083, 43, 56, 25, 63, 26, 726, 47, 175, 21, 300, 34, 1587, 53, 26, 59, 2523, 20, 96, 33, 847, 61, 1014, 38, 243, 67, 140, 71, 2883, 18, 1734 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Collatz-conjecture can be formulated via this sequence by postulating that all iterations of a(n), starting from any n > 1, will eventually end reach the cycle [2, 3].

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

Index entries for sequences related to 3x+1 (or Collatz) problem

Index entries for sequences computed from indices in prime factorization

FORMULA

If n is odd, then a(n) = A064989(n), otherwise a(n) = A064989(A329603(n)).

a(n) = A005940(1+A014682(A156552(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), 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)));

A341516(n) = if(n%2, A064989(n), A064989(A329603(n)));

CROSSREFS

Cf. A005940, A014682, A064989, A156552, A329603.

Cf. A341515 for a variant.

Sequence in context: A038572 A334667 A245676 * A060992 A064455 A141619

Adjacent sequences:  A341513 A341514 A341515 * A341517 A341518 A341519

KEYWORD

nonn

AUTHOR

Antti Karttunen, Feb 15 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 4 08:57 EDT 2021. Contains 346445 sequences. (Running on oeis4.)