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 A245942 #10 Oct 04 2015 02:01:54 %S A245942 5,10,7,16,6,5,10,7,16,7,16,8,6,5,10,7,16,9,22,13,34,19,52,28,16,10,7, %T A245942 16,11,28,16,12,8,6,5,10,7,16,13,34,19,52,28,16,14,9,22,13,34,19,52, %U A245942 28,16,15,40,22,13,34,19,52,28,16,16,10,7,16,17,46,25,70 %N A245942 Irregular triangle read by rows of a variation of the Collatz iteration with signature (2,3). %C A245942 It is conjectured that the trajectory of this Collatz-like iteration arrives at 16 in a finite number of steps for any initial value x, (x>4). The iterative step is divide by 2 and add 2 if even, or multiply by 3 and subtract 5 if odd. For any odd initial value (x>6) the number of steps in the trajectory is the same as the number of steps in the Collatz trajectory starting with floor(x-3)/2. %C A245942 This is one of a subset of Collatz-like variations with parameters a = 2 and b = (any positive or negative odd integer). The halting value h for type (a=2, b:odd) is given by h = 12 + b + 1. Any even halting value can be chosen by selecting the appropriate value for b. For any sequence starting with an odd number x, the halting value is arrived at in the same number of steps as the Collatz trajectory starting with floor((x-b)/2). The iterative function for variation type (a=2, b:odd) is x -> (x/2 + ceiling(b/2)) if x is even or x -> (3*x - 2*b + 1) if x is odd. %C A245942 Two variations belong to the same subset if their (a) parameters are the same and their (b) parameters have the same parity. It is conjectured that any variations belonging to the same subset have equal row lengths. Members of the same subset share other properties. For example, if a trajectory of subset type (a=2, b:odd) starts with an odd number, then the function floor((x-b)/2) maps the element values (x) of this trajectory to a trajectory of A245691. %C A245942 The subset is part of a wider class of Collatz variations uniquely identified by two parameters (a,b) where a or b can be any integer. The general formula for the halting value is h = 6^(b mod 2)*a + b + b mod 2; the general formula for the iterative mapping function is x -> (x/2 + ceiling(b/2)) if x is even and x -> (3*x - 2*b + a^(a mod 2)) if x is odd. The minimum starting value is b + 1 + b mod 2 for a = 1 or a = 2. Values of a other than 1 or 2 are not always "well behaved". %e A245942 Some initial rows of the irregular array (r,j): %e A245942 r: j = (1, 2, 3, ... ) %e A245942 1: (5, 10, 7, 16), %e A245942 2: (6, 5, 10, 7, 16), %e A245942 3: (7, 16), %e A245942 4: (8, 6, 5, 10, 7, 16), %e A245942 5: (9, 22, 13, 34, 19, 52, 28, 16), %e A245942 6: (10, 7, 16), %e A245942 7: (11, 28, 16), %e A245942 8: (12, 8, 6, 5, 10, 7, 16), %e A245942 8: (13, 34, 19, 52, 28, 16), %e A245942 10: (14, 9, 22, 13, 34, 19, 52, 28, 16), %e A245942 11: (15, 40, 22, 13, 34, 19, 52, 28, 16), %e A245942 12: (16, 10, 7, 16) %o A245942 (PARI) {for(n=5, 17, x=n; print1(x,", "); until(x==16, if(x%2,x=x*3-5,x=x/2+2);print1(x,", ")))} \\ Prints flattened triangle. %o A245942 (PARI) variation(a,b) = {if(!(a==1||a==2), print("Enter a=1 or a=2"), h=6^(b%2)*a+b+b%2; c=ceil(b/2); d=2*-b+a^(a%2); for(r=1,12, x=r+b+b%2; print1(r,": (",x); until(x==h, if(x%2, x=3*x+d, x=x/2+c); print1(", ",x)); print("),")))} \\ Generalized version. %o A245942 {variation(2,3)} \\ Prints first 12 rows of this irregular array. %Y A245942 Cf. A245691. %Y A245942 Cf. A245943 for variation type (a=1, b:even). %Y A245942 Cf. A245944 for variation type (a=2, b:even). %Y A245942 Cf. A242030 for variation type (a=1, b:odd). %K A245942 nonn,tabf %O A245942 1,1 %A A245942 _K. Spage_, Aug 08 2014