%I #31 Oct 26 2021 07:47:38
%S 5,2,9,8,8,10,11,22,11,16,10,14,22,29,22,26,20,27,28,26,41,36,46,42,
%T 40,42,46,42,48,44,73,62,52,53,68,69,60,67,78,73,71,86,67,80,70,96,85,
%U 88,83,80,94,84,95,96,103,101,100,110,94,113,109,120,118,126
%N a(n) is the length of the n-th row of A348433 when it is written as an irregular triangle.
%H Michael De Vlieger, <a href="/A348408/b348408.txt">Table of n, a(n) for n = 1..5000</a>
%e When A348433 is written as an irregular triangle the first three rows are:
%e 1, 2, 4, 8, 16;
%e 7, 14;
%e 5, 10, 20, 40, 80, 160, 320, 640, 1280;
%e The lengths of the rows are [5, 2, 9] respectively, the same as the first three terms of this sequence.
%t c[1] = m = 1; Most@ Prepend[Differences[#], First[#]] &@ Reap[Do[If[IntegerQ[c[#]], Set[n, 2 m], Set[n, #]] &@ Total@ IntegerDigits[m]; If[m > n, Sow[i]]; Set[c[n], 1]; m = n, {i, 2^12}]][[-1, -1]] (* _Michael De Vlieger_, Oct 25 2021 *)
%o (PARI) lista(nn) = my(k, r, s, v=List([1])); for(n=1, nn, while(setsearch(vecsort(v), s=sumdigits(v[k++])), listput(v, 2*v[k])); listput(v, s); print1(k-r, ", "); r=k); \\ _Jinyuan Wang_, Oct 21 2021
%Y Cf. A348433.
%K nonn
%O 1,1
%A _Rodolfo Kurchan_, Oct 19 2021
%E More terms from _Jinyuan Wang_, Oct 21 2021