A253425 Lengths of runs of identical terms in A253415.
1, 1, 6, 11, 18, 12, 5, 22, 91, 143, 1, 93, 370, 182, 20, 20, 315, 332, 973, 157, 1223, 1807, 325, 4044, 7412, 11211, 4600, 2176, 14848, 4659, 3123, 10852, 1678, 20862, 3348
Offset: 1
Programs
-
Haskell
import Data.List (group) a253425 n = a253425_list !! (n-1) a253425_list = map length $ group a253415_list
-
Mathematica
c[] = 0; c[1] = j = 1; u = 2; s = 3; Most@ Tally[#][[All, -1]] &@ Reap[Do[d = Divisors[s]; k = 1; While[c[d[[k]]] > 0, k++]; Set[k, d[[k]]]; Set[c[k], i]; If[k == u, While[c[u] > 0, u++]]; Sow[u]; j = k; s += k, {i, 2, 2^12}]][[-1, -1]] (* _Michael De Vlieger, Jan 23 2022 *)
-
Python
from itertools import islice from sympy import divisors def A253425_gen(): # generator of terms bset, l, m, s = {1}, 0, 2, 3 while True: for d in divisors(s): if d not in bset: bset.add(d) if m in bset: yield l l = 1 while m in bset: m += 1 else: l += 1 s += d break A253425_list = list(islice(A253425_gen(),20)) # Chai Wah Wu, Jan 25 2022
Extensions
a(14)-a(35) from Michael De Vlieger, Jan 23 2022