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!)
A358066 Inventory sequence: record where the 1's, 2's, etc. are located starting with a(1) = 1, a(2) = 1 (see example). 3

%I #46 Nov 08 2022 09:44:13

%S 1,1,1,2,1,2,3,4,1,2,3,5,4,6,7,1,2,3,5,9,4,6,10,7,11,8,13,1,2,3,5,9,

%T 16,4,6,10,17,7,11,18,8,13,21,12,19,1,2,3,5,9,16,28,4,6,10,17,29,7,11,

%U 18,30,8,13,21,34,12,19,31,14,22,35,1,2,3,5,9,16,28,46,4,6,10,17,29,47,7,11,18,30,48

%N Inventory sequence: record where the 1's, 2's, etc. are located starting with a(1) = 1, a(2) = 1 (see example).

%e At stage n >= 1 we only look at the numbers 1 up to n, and ignore numbers bigger than n.

%e Stage 0: start with a(1) = 1, a(2) = 1.

%e Stage 1: we see 1's at 1,2, so we adjoin 1,2, getting 1,1, 1,2.

%e Stage 2: we see 1's at 1,2,3, and 2's at 4, so we adjoin 1,2,3,4, getting 1,1,1,2, 1,2,3,4.

%e Stage 3: we see 1's at 1,2,3,5, 2's at 4,6 and 3's at 7, so we adjoin 1,2,3,5,4,6,7, getting 1,1,1,2,1,2,3,4, 1,2,3,5,4,6,7.

%e Stage 4: we see 1's at 1,2,3,5,9, 2's at 4,6,10, 3's at 7,11, 4's at 8,13, so we adjoin 1,2, ..., 8,13 and so on.

%e We obtain an irregular triangle by writing the results of the stages as separate rows:

%e 1, 1,

%e 1, 2,

%e 1, 2, 3, 4,

%e 1, 2, 3, 5, 4, 6, 7,

%e 1, 2, 3, 5, 9, 4, 6, 10, 7, 11, 8, 13,

%e 1, 2, 3, 5, 9, 16, 4, 6, 10, 17, 7, 11, 18, 8, 13, 21, 12, 19,

%e 1, 2, 3, 5, 9, 16, 28, 4, 6, 10, 17, 29, 7, 11, 18, 30, 8, 13, 21, 34, 12, 19, 31, 14, 22, 35,

%e ... (_N. J. A. Sloane_, Nov 07 2022)

%o (Python)

%o terms = [1, 1]

%o for i in range(1,11):

%o new_terms = []

%o for j in range(1, i+1):

%o for k in range(len(terms)):

%o if terms[k] == j: new_terms.append(k+1)

%o terms.extend(new_terms)

%o print(terms) # _Gleb Ivanov_, Nov 01 2022

%Y See A357443 for another version.

%Y Cf. A030717, A055187, A217780, A342585, A357317, A356784.

%K nonn,tabf

%O 1,4

%A _Ctibor O. Zizka_, Oct 29 2022

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 July 12 13:24 EDT 2024. Contains 374247 sequences. (Running on oeis4.)