A245944 Irregular triangle read by rows of a variation of the Collatz iteration with signature (2,4).
5, 8, 6, 6, 5, 8, 6, 7, 14, 9, 20, 12, 8, 6, 8, 6, 9, 20, 12, 8, 6, 10, 7, 14, 9, 20, 12, 8, 6, 11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6, 12, 8, 6, 13, 32, 18, 11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6, 14, 9, 20, 12, 8, 6
Offset: 1
Examples
Some initial rows of the irregular array (r,j): r: j = (1, 2, 3, ... ) 1: (5, 8, 6), 2: (6, 5, 8, 6), 3: (7, 14, 9, 20, 12, 8, 6), 4: (8, 6), 5: (9, 20, 12, 8, 6), 6: (10, 7, 14, 9, 20, 12, 8, 6), 7: (11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6), 8: (12, 8, 6), 9: (13, 32, 18, 11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6), 10: (14, 9, 20, 12, 8, 6), 11: (15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6), 12: (16, 10, 7, 14, 9, 20, 12, 8, 6)
Crossrefs
Programs
-
PARI
{for(n=5, 16, x=n; print1(x,", "); until(x==6, if(x%2,x=x*3-7,x=x/2+2);print1(x,", ")))} \\ Prints flattened triangle.
-
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. {variation(2,4)} \\ Prints first 12 rows of this irregular array.
Comments