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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A322521 If A319303(k) = n for some k, then a(n) = k, else a(n) = -1. 2
 0, 1, 12, 2, 6, 16, 198, 3, 454, 8, 102, 20, 22, 262, 378, 4, 54, 582, 742, 10, 11, 134, 186, 24, 1766, 30, 918403141209018, 326, 358, 506, 214715699432378, 5, 3814, 70, 90, 710, 774, 998, 51174, 14, 496190676143034, 15, 6918, 166, 182, 250, 109162583165882 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS If the Collatz conjecture is true, then this sequence contains every nonnegative integers. LINKS Rémy Sigrist, Table of n, a(n) for n = 1..10000 EXAMPLE A319303(18) = 80, hence a(80) = 18. MATHEMATICA a[n0_] := Module[{n=n0, v=0}, While[n>1, t = If[OddQ[n], 3n+1, n/2]; If[t>4 && Mod[t+2, 6] == 0, v *= 2; v += Mod[n, 2]]; n = t; v++]; v] Array[a, 50] (* Jean-François Alcover, Dec 18 2018, translated from PARI *) PROG (PARI) a(n) = my (v=0); while (n>1, my (t=if (n%2, 3*n+1, n/2)); if (t>4 && (t+2)%6==0, v*=2; v+=n%2); n=t; v++); v CROSSREFS Cf. A319303. Sequence in context: A054383 A036383 A107832 * A099136 A215416 A264970 Adjacent sequences:  A322518 A322519 A322520 * A322522 A322523 A322524 KEYWORD nonn AUTHOR Rémy Sigrist, Dec 13 2018 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.

Last modified February 28 04:12 EST 2020. Contains 332321 sequences. (Running on oeis4.)