OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..5000
EXAMPLE
When A348433 is written as an irregular triangle the first three rows are:
1, 2, 4, 8, 16;
7, 14;
5, 10, 20, 40, 80, 160, 320, 640, 1280;
The lengths of the rows are [5, 2, 9] respectively, the same as the first three terms of this sequence.
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Rodolfo Kurchan, Oct 19 2021
EXTENSIONS
More terms from Jinyuan Wang, Oct 21 2021
STATUS
approved