login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A355917 Variant of Inventory Sequence A342585 where indices are also counted (short version). 6
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, 16, 16, 18, 10, 12, 11, 8, 6, 7, 5, 5, 6, 4, 3, 2, 2, 3, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
See A355916 for further information.
LINKS
Rémy Sigrist, PARI program
EXAMPLE
The first eight inventories are:
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,
...
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 *)
PROG
(PARI) See Links section.
(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
CROSSREFS
Sequence in context: A291929 A327807 A188448 * A304789 A264379 A090888
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 24 2022
EXTENSIONS
More terms from Rémy Sigrist, Sep 25 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 11 07:17 EST 2023. Contains 367717 sequences. (Running on oeis4.)