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!)
A335870 a(n) is the least k > 0 such that T^k(n) = T^(2*k)(n) (where T^k denotes the k-th iterate of A006370, the Collatz map); a(n) = -1 if no such k exists. 1
1, 3, 3, 6, 3, 3, 6, 15, 3, 18, 6, 12, 9, 9, 15, 15, 3, 12, 18, 18, 6, 6, 15, 15, 9, 21, 9, 111, 18, 18, 18, 105, 3, 24, 12, 12, 21, 21, 21, 33, 6, 108, 6, 27, 15, 15, 15, 102, 9, 24, 24, 24, 9, 9, 111, 111, 18, 30, 18, 30, 18, 18, 105, 105, 6, 27, 27, 27, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

If the Collatz conjecture is true, then a(n) > 0 for all n >= 0.

LINKS

Rémy Sigrist, Table of n, a(n) for n = 0..10000

Wikipedia, Floyd's Tortoise and Hare

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

EXAMPLE

For n = 3 we have:

    k  T^k(3)  T^(2*k)(3)

    -  ------  ----------

    1      10           5

    2       5           8

    3      16           2

    4       8           4

    5       4           1

    6       2           2

so a(3) = 6.

PROG

(PARI) a(n, T=x->if (x%2, 3*x+1, x/2)) = my (x1=n, x2=n); for (k=1, oo, x1=T(x1); x2=T(T(x2)); if (x1==x2, return (k)))

CROSSREFS

Cf. A006370, A139399.

Sequence in context: A020813 A034188 A184849 * A339496 A336422 A040007

Adjacent sequences:  A335867 A335868 A335869 * A335871 A335872 A335873

KEYWORD

nonn

AUTHOR

Rémy Sigrist, Jun 28 2020

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 April 12 01:36 EDT 2021. Contains 342912 sequences. (Running on oeis4.)