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!)
A357317 Inventory count sequence: record what you see and where it is located. 5
0, 1, 0, 0, 3, 0, 0, 2, 3, 1, 1, 1, 5, 0, 0, 2, 3, 5, 6, 4, 1, 1, 9, 10, 11, 1, 2, 7, 2, 3, 4, 8, 7, 0, 0, 2, 3, 5, 6, 13, 14, 7, 1, 1, 9, 10, 11, 20, 21, 25, 4, 2, 7, 15, 26, 28, 4, 3, 4, 8, 16, 29, 2, 4, 19, 30, 2, 5, 12, 17, 1, 6, 18, 1, 7, 27, 1, 8, 31, 1, 9, 22, 1, 10, 23, 1, 11, 24, 9, 0, 0, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
To get started we set a(0)=0. Now start with zero terms. We record ONE ZERO at position ZERO. The sequence is now 0,1,0,0. Now start again with zero terms. We record THREE ZEROS at positions 0,2,3. Next start with one terms. We record ONE ONE at position ONE. The sequence is now 0,1,0,0,3,0,0,2,3,1,1,1. Now start again with zero terms...one terms...two terms...three terms. The sequence is now 0,1,...,2,3,4,8. And so on.
LINKS
Thomas Scheuerle, a(0..10000) as scatter plot
EXAMPLE
a(0) = 0
counting over a(0):
a(1) = 1, a(2) = 0, a(3) = 0 (count one zero at position 0)
counting over a(0)..a(3):
a(4) = 3, a(5) = 0, a(6) = 0, a(7) = 2, a(8) = 3, (count 3 zeros at positions 0,2,3)
a(9) = 1, a(10) = 1, a(11) = 1 (count 1 one at position 1)
counting over a(0)..a(11):
a(12) = 5, a(13) = 0, a(14) = 0, a(15) = 2, a(16) = 3, a(17) = 5, a(18) = 6 (count 5 zeros at positions 0,2,3,5,6)
a(19) = 4, a(20) = 1, a(21) = 1, a(22) = 9, a(23) = 10, a(24) = 11 (count 4 ones at positions 1,9,10,11)
a(25) = 1, a(26) = 2, a(27) = 7 (count 1 two at position 7)
a(28) = 2, a(29) = 3, a(30) = 4, a(31) = 8 (count 2 threes at positions 4,8)
counting over a(0)..a(31):
etc.
PROG
(MATLAB)
function a = A357317( min_length )
a = 0;
while length(a) < min_length
b = a; c = unique(a);
for m = 1:length(c)
nextnumber = c(m);
indices = find(a == nextnumber);
b = [b length(indices) nextnumber indices-1];
end
a = b;
end
end % Thomas Scheuerle, Sep 29 2022
CROSSREFS
Cf. A342585.
Sequence in context: A128113 A108930 A059682 * A357236 A156548 A112883
KEYWORD
nonn,look
AUTHOR
Ctibor O. Zizka, Sep 29 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 April 30 20:43 EDT 2024. Contains 372141 sequences. (Running on oeis4.)