cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A338819 #20 Jul 01 2023 09:29:00
%S A338819 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 A338819 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 A338819 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 A338819 The entries in the rows of the n X n identity matrix, multiplied by the size of the matrix (n).
%e A338819 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 A338819 (Python)
%o A338819 import numpy as np
%o A338819 def n_id_sequence(iterations):
%o A338819     sequence = []
%o A338819     for i in range(1,iterations+1):
%o A338819         matrix = i*(np.identity(i))
%o A338819         for row in matrix:
%o A338819             for entry in row:
%o A338819                 sequence.append(int(entry))
%o A338819     return sequence
%Y A338819 Cf. A191747 (with 1's), A191748 (locations of nonzero terms), A056520 (start location of each matrix).
%K A338819 nonn,easy
%O A338819 1,2
%A A338819 _Julia Zimmerman_, Nov 10 2020