A245691 Irregular triangle of Collatz like iteration, x -> 3x, then repeat (x -> ceiling(x/2) if divisible by 3, otherwise x -> 3x) while x != 6.
1, 3, 2, 6, 2, 6, 3, 9, 5, 15, 8, 24, 12, 6, 4, 12, 6, 5, 15, 8, 24, 12, 6, 6, 18, 9, 5, 15, 8, 24, 12, 6, 7, 21, 11, 33, 17, 51, 26, 78, 39, 20, 60, 30, 15, 8, 24, 12, 6, 8, 24, 12, 6, 9, 27, 14, 42, 21, 11, 33, 17, 51, 26, 78, 39, 20, 60, 30, 15, 8, 24, 12
Offset: 1
Examples
The irregular array a(n,k) starts: n\k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ... 1: 1 3 2 6 2: 2 6 3: 3 9 5 15 8 24 12 6 4: 4 12 6 5: 5 15 8 24 12 6 6: 6 18 9 5 15 8 24 12 6 7: 7 21 11 33 17 51 26 78 39 20 60 30 15 8 24 12 6 8: 8 24 12 6 9: 9 27 14 42 21 11 33 17 51 26 78 39 20 60 30 15 8 24 12 6 10: 10 30 15 8 24 12 6 11: 11 33 17 51 26 78 39 20 60 30 15 8 24 12 6 12: 12 36 18 9 5 15 8 24 12 6 13: 13 39 20 60 30 15 8 24 12 6 14: 14 42 21 11 33 17 51 26 78 39 20 60 30 15 8 24 12 6 15: 15 45 23 69 35 105 53 159 80 240 120 60 30 15 8 24 12 6
Programs
-
PARI
{ for(n=1, 15, x=n*3; print1(n,", ",x,", "); while(x!=6, if(x%3, x*=3, x=ceil(x/2)); print1(x,", "))) }
Comments