OFFSET
1,2
COMMENTS
First differences of A343880, preceded by 1.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..16384 (first 10000 terms from Hugo Pfoertner)
MATHEMATICA
Prepend[Differences[#], First[#]] &@ Position[Block[{c, k, m}, c[0] = 1; {0}~Join~Reap[Do[k = 0; While[IntegerQ[c[k]], Set[m, c[k]]; Sow[m]; If[IntegerQ@ c[m], c[m]++, c[m] = 1]; k++]; Sow[0]; c[0]++, 52]][[-1, -1]]], 0][[All, 1]] (* Michael De Vlieger, Oct 12 2021 *)
(* Faster code: *)
Block[{c, m, k}, c[_] = 0; Reap[Do[k = 0; While[c[k] > 0, Set[m, c[k]]; c[m]++; k++]; Set[m, c[k]]; Sow[k + 1]; c[m]++, {i, 53}]][[-1, -1]]] (* Michael De Vlieger, Nov 13 2021 *)
PROG
(Python)
from collections import Counter
def aupton(terms):
num, A342585lst, inventory, alst, rowlen = 0, [0], Counter([0]), [1], 0
while len(alst) < terms:
rowlen += 1
c = inventory[num]
if c == 0:
num = 0
alst.append(rowlen)
rowlen = 0
else:
num += 1
A342585lst.append(c)
inventory.update([c])
return alst
print(aupton(53)) # Michael S. Branicky, Aug 27 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 27 2021
STATUS
approved