The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A368509 Irregular triangle read by rows. A variation on the inventory sequence A342585. See Comments and Example sections for details. 1
0, 1, 1, 1, 2, 2, 1, 2, 0, 0, 2, 3, 2, 3, 2, 5, 1, 2, 0, 0, 3, 5, 3, 4, 2, 6, 2, 4, 1, 2, 2, 2, 1, 1, 0, 0, 4, 7, 4, 7, 3, 10, 3, 6, 2, 4, 2, 2, 2, 2, 1, 2, 0, 0, 5, 9, 5, 8, 4, 14, 3, 6, 3, 6, 3, 4, 3, 3, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 6, 11, 6, 14, 5, 14, 4, 10, 4, 9, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Build an irregular triangle in a slightly similar manner to A342585:
Here, record the number of rows containing zeros thus far in the irregular triangle, then the number of columns containing zeros thus far, then the number of rows containing ones thus far, then again the number of columns with ones and so on alternately counts of rows and of columns, until a completed row-column value pair is recorded with either being zero; a new row of the triangle then starts again, recording the number of rows having any zero in them, then the number of columns, and so on. The sequence is the triangle read by rows.
LINKS
EXAMPLE
The irregular triangle begins:
0, 1;
1, 1, 2, 2, 1, 2, 0, 0;
2, 3, 2, 3, 2, 5, 1, 2, 0, 0;
3, 5, 3, 4, 2, 6, 2, 4, 1, 2, 2, 2, 1, 1, 0, 0;
4, 7, 4, 7, 3, 10, 3, 6, 2, 4, 2, 2, 2, 2, 1, 2, 0, 0;
...
PROG
(Python)
from itertools import islice
from collections import Counter
def agen(): # generator of terms
rowinventory, colinventory, thisrow, m = Counter(), dict(), set(), 0
while True:
rc = rowinventory[m]
yield rc
if rc not in thisrow: rowinventory[rc] += 1; thisrow.add(rc)
if rc not in colinventory: colinventory[rc] = {2*m}
else: colinventory[rc].add(2*m)
cc = len(colinventory.get(m, set()))
yield cc
if cc not in thisrow: rowinventory[cc] += 1; thisrow.add(cc)
if cc not in colinventory: colinventory[cc] = {2*m+1}
else: colinventory[cc].add(2*m+1)
if rc == 0 or cc == 0: m = 0; thisrow = set()
else: m += 1
print(list(islice(agen(), 90))) # Michael S. Branicky, Dec 28 2023
CROSSREFS
Cf. A342585.
Sequence in context: A208929 A039965 A300481 * A074942 A043754 A144191
KEYWORD
nonn,tabf
AUTHOR
Tamas Sandor Nagy, Dec 28 2023
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 June 5 13:00 EDT 2024. Contains 373105 sequences. (Running on oeis4.)