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 A123390 #21 Mar 22 2025 19:25:17 %S A123390 1,2,1,3,4,2,1,5,6,3,7,8,4,2,1,9,10,5,11,12,6,3,13,14,7,15,16,8,4,2,1, %T A123390 17,18,9,19,20,10,5,21,22,11,23,24,12,6,3,25,26,13,27,28,14,7,29,30, %U A123390 15,31,32,16,8,4,2,1,33,34,17,35,36,18,9,37,38,19,39,40,20,10,5,41,42,21 %N A123390 Triangle read by rows: n-th row starts with n and continues with half the previous value as long as that is even. %C A123390 A fractal sequence, generated by the rule a(n) is a new maximum when a(n-1) is odd and a repetition of an earlier value when a(n-1) is even. %C A123390 From _Flávio V. Fernandes_, Mar 13 2025: (Start) %C A123390 a(n) is given by A003602(n) at A001511(n) diagram %C A123390 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 %C A123390 . 1 . . . 2 . . . 3 . . . 4 . . . %C A123390 . . . 1 . . . . . . . 2 . . . . . %C A123390 . . . . . . . 1 . . . . . . . . . %C A123390 . . . . . . . . . . . . . . . 1 . %C A123390 read by backwards 2^n, which is given by A118319(n) at A001511(n) diagram %C A123390 1 . 2 . 4 . 5 . 8 . 9 .11 .12 .16 %C A123390 . 3 . . . 6 . . .10 . . .13 . . . %C A123390 . . . 7 . . . . . . .14 . . . . . %C A123390 . . . . . . .15 . . . . . . . . . %C A123390 . . . . . . . . . . . . . . .31 . - see formula. (End) %H A123390 Alois P. Heinz, <a href="/A123390/b123390.txt">Rows n = 1..10000, flattened</a> %F A123390 a(1) = 1, for n > 1, if a(n-1) is even, a(n) = a(n-1)/2, otherwise a(n) = (max_{k<n} a(k)) + 1. %F A123390 Ordinal transform of A082850. %F A123390 a(n) = A003602(A108918(n)). - _Flávio V. Fernandes_, Mar 13 2025 %e A123390 Triangle starts %e A123390 1; %e A123390 2, 1; %e A123390 3; %e A123390 4, 2, 1; %e A123390 5; %e A123390 6, 3; %e A123390 7; %e A123390 8, 4, 2, 1; %e A123390 9; %e A123390 10, 5; %e A123390 11; %e A123390 12, 6, 3; %e A123390 13; %p A123390 T:= proc(n) local m,l; m:=n; l:= m; %p A123390 while irem(m, 2, 'm')=0 do l:=l,m od: l %p A123390 end: %p A123390 seq(T(n), n=1..40); # _Alois P. Heinz_, Oct 09 2015 %t A123390 Flatten[Function[n, NestWhile[Append[#, Last[#]/2] &, {n}, EvenQ[Last[#]] &]][#] & /@ Range[20]] (* _Birkas Gyorgy_, Apr 13 2011 *) %Y A123390 Row lengths are A001511. %Y A123390 Row sums give A129527. %Y A123390 Cf. A120385. %Y A123390 Cf. A003602, A108918, A118319. %K A123390 nonn,tabf %O A123390 1,2 %A A123390 _Franklin T. Adams-Watters_, Oct 13 2006