|
|
A347299
|
|
Lengths of successive rows when the Inventory Sequence A342585 is written as a triangle.
|
|
4
|
|
|
1, 3, 4, 6, 6, 8, 9, 9, 11, 12, 13, 13, 15, 15, 17, 17, 18, 19, 20, 22, 22, 25, 25, 25, 27, 28, 28, 30, 30, 33, 33, 34, 35, 35, 37, 37, 39, 39, 42, 42, 43, 44, 47, 47, 47, 49, 49, 49, 50, 52, 52, 54, 54
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
First differences of A343880, preceded by 1.
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|