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!)
A338819 The entries in the rows of the n X n identity matrix, multiplied by the size of the matrix (n). 0

%I #20 Jul 01 2023 09:29:00

%S 1,2,0,0,2,3,0,0,0,3,0,0,0,3,4,0,0,0,0,4,0,0,0,0,4,0,0,0,0,4,5,0,0,0,

%T 0,0,5,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,0,5,6,0,0,0,0,0,0,6,0,0,0,0,0,

%U 0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,6,7,0

%N The entries in the rows of the n X n identity matrix, multiplied by the size of the matrix (n).

%e For every identity matrix of size n starting with n=1, append n*(each entry of each row of the matrix), e.g., n=1 -> 1, n=2 -> 2,0,0,2, so the first 5 terms of the sequence are 1,2,0,0,2.

%o (Python)

%o import numpy as np

%o def n_id_sequence(iterations):

%o sequence = []

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

%o matrix = i*(np.identity(i))

%o for row in matrix:

%o for entry in row:

%o sequence.append(int(entry))

%o return sequence

%Y Cf. A191747 (with 1's), A191748 (locations of nonzero terms), A056520 (start location of each matrix).

%K nonn,easy

%O 1,2

%A _Julia Zimmerman_, Nov 10 2020

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 August 23 08:01 EDT 2024. Contains 375375 sequences. (Running on oeis4.)