[go: up one dir, main page]

login
Revision History for A355917 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Variant of Inventory Sequence A342585 where indices are also counted (short version).
(history; published version)
#20 by N. J. A. Sloane at Sun Sep 25 21:35:31 EDT 2022
STATUS

proposed

approved

#19 by Michel Marcus at Sun Sep 25 12:30:58 EDT 2022
STATUS

editing

proposed

#18 by Michel Marcus at Sun Sep 25 12:30:52 EDT 2022
EXAMPLE

0,

2, 0,

4, 1, 1, 0,

6, 4, 2, 1, 2, 0,

8, 6, 5, 2, 3, 2, 2, 0,

10, 7, 9, 4, 5, 4, 3, 2, 1, 1, 1, 0,

12, 11, 11, 6, 7, 5, 5, 4, 2, 2, 2, 3, 1, 0,

14, 13, 15, 8, 9, 8, 6, 5, 5, 4, 3, 4, 2, 2, 1, 1, 0,

...

...

STATUS

proposed

editing

#17 by Michael De Vlieger at Sun Sep 25 12:22:07 EDT 2022
STATUS

editing

proposed

#16 by Michael De Vlieger at Sun Sep 25 12:16:00 EDT 2022
MATHEMATICA

nn = 9; c[_] = 0; i = 1; Do[k = 0; While[c[k] > 0, Set[{a[i], a[i + 1]}, {c[k], k}]; c[a[i]]++; c[a[i + 1]]++; i += 2; k++]; Set[{a[i], a[i + 1]}, {c[k], k}]; c[a[i]]++; c[a[i + 1]]++; i += 2, nn]; Array[a[2 # - 1] &, (i - 1)/2] (* Michael De Vlieger, Sep 25 2022 *)

STATUS

approved

editing

#15 by N. J. A. Sloane at Sun Sep 25 10:31:44 EDT 2022
STATUS

proposed

approved

#14 by Michael S. Branicky at Sun Sep 25 07:44:58 EDT 2022
STATUS

editing

proposed

#13 by Michael S. Branicky at Sun Sep 25 07:44:30 EDT 2022
PROG

(Python)

from collections import Counter

def aupton(terms):

num, alst, inventory = 0, [0, 0], Counter([0, 0])

for n in range(3, 2*terms):

c = [inventory[num], num]

num = 0 if c[0] == 0 else num + 1

alst.extend(c)

inventory.update(c)

return alst[:2*terms:2]

print(aupton(82)) # Michael S. Branicky, Sep 25 2022

STATUS

proposed

editing

Discussion
Sun Sep 25
07:44
Michael S. Branicky: program matches all terms in b-file
#12 by Rémy Sigrist at Sun Sep 25 03:47:29 EDT 2022
STATUS

editing

proposed

#11 by Rémy Sigrist at Sun Sep 25 03:46:31 EDT 2022
EXAMPLE

14, 13, 15, 8, 9, 7, 6, 8, 6, 4, 5, 5, 4, 3, 4, 2, 2, 1, 1, 0,

Discussion
Sun Sep 25
03:47
Rémy Sigrist: added more terms + program + b-file / fixed typo in data