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.
%I A350515 #18 Jan 04 2022 05:25:48 %S A350515 0,0,1,5,1,8,3,2,4,14,3,17,6,4,7,23,5,26,9,6,10,32,7,35,12,8,13,41,9, %T A350515 44,15,10,16,50,11,53,18,12,19,59,13,62,21,14,22,68,15,71,24,16,25,77, %U A350515 17,80,27,18,28,86,19,89,30,20,31,95,21,98,33,22,34,104 %N A350515 a(n) = (n-1)/3 if n mod 3 = 1; a(n) = n/2 if n mod 6 = 0 or n mod 6 = 2; a(n) = (3n+1)/2 if n mod 6 = 3 or n mod 6 = 5. %C A350515 This is a variant of the Farkas map (A349407). %C A350515 Yolcu, Aaronson and Heule prove that the trajectory of the iterates of the map starting from any nonnegative integer always reaches 0. %C A350515 If displayed as a rectangular array with six columns, the columns are A008585, A005843, A016777, A017221, A005408, A017257 (see example). - _Omar E. Pol_, Jan 02 2022 %H A350515 H. M. Farkas, "Variants of the 3N+1 Conjecture and Multiplicative Semigroups", in Entov, Pinchover and Sageev, <a href="https://bookstore.ams.org/conm-387">Geometry, Spectral Theory, Groups, and Dynamics, Contemporary Mathematics, vol. 387</a>, American Mathematical Society, 2005, p. 121. %H A350515 Emre Yolcu, Scott Aaronson and Marijn J. H. Heule, <a href="https://arxiv.org/abs/2105.14697">An Automated Approach to the Collatz Conjecture</a>, arXiv:2105.14697 [cs.LO], 2021, pp. 21-25. %H A350515 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,2,0,0,0,0,0,-1). %F A350515 a(n) = (A349407(n+1)-1)/2. %F A350515 a(n) = 2*a(n-6)-a(n-12). - _Wesley Ivan Hurt_, Jan 03 2022 %e A350515 From _Omar E. Pol_, Jan 02 2022: (Start) %e A350515 Written as a rectangular array with six columns read by rows the sequence begins: %e A350515 0, 0, 1, 5, 1, 8; %e A350515 3, 2, 4, 14, 3, 17; %e A350515 6, 4, 7, 23, 5, 26; %e A350515 9, 6, 10, 32, 7, 35; %e A350515 12, 8, 13, 41, 9, 44; %e A350515 15, 10, 16, 50, 11, 53; %e A350515 18, 12, 19, 59, 13, 62; %e A350515 21, 14, 22, 68, 15, 71; %e A350515 24, 16, 25, 77, 17, 80; %e A350515 27, 18, 28, 86, 19, 89; %e A350515 30, 20, 31, 95, 21, 98; %e A350515 ... %e A350515 (End) %t A350515 nterms=100;Table[If[Mod[n,3]==1,(n-1)/3,If[Mod[n,6]==0||Mod[n,6]==2,n/2,(3n+1)/2]],{n,0,nterms-1}] %t A350515 (* Second program *) %t A350515 nterms=100;LinearRecurrence[{0,0,0,0,0,2,0,0,0,0,0,-1},{0,0,1,5,1,8,3,2,4,14,3,17},nterms] %o A350515 (Python) %o A350515 def a(n): %o A350515 r = n%6 %o A350515 if r == 1 or r == 4: return (n-1)//3 %o A350515 if r == 0 or r == 2: return n//2 %o A350515 if r == 3 or r == 5: return (3*n+1)//2 %o A350515 print([a(n) for n in range(70)]) # _Michael S. Branicky_, Jan 02 2022 %Y A350515 Cf. A005408, A005843, A006370, A014682, A016777, A017221, A017257, A349407, A350279. %K A350515 nonn,easy %O A350515 0,4 %A A350515 _Paolo Xausa_, Jan 02 2022