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.

Showing 1-2 of 2 results.

A191747 Concatenation of row entries of the n X n identity matrices.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

L. Edson Jeffery, Jun 27 2011

Keywords

Comments

The sequence of all n for which a(n)=1 is A191748 = {1,2,5,6,10,14,...}.

Programs

  • Mathematica
    Flatten[Table[Array[KroneckerDelta, {n, n}], {n, 1, 6}]] (* Geoffrey Critzer, Dec 11 2011 *)
  • PARI
    for(n=1,9,for(a=1,n,for(b=1,n,print1(a==b", ")))) \\ Charles R Greathouse IV, Jun 29 2011

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Julia Zimmerman, Nov 10 2020

Keywords

Examples

			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.
		

Crossrefs

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

Programs

  • Python
    import numpy as np
    def n_id_sequence(iterations):
        sequence = []
        for i in range(1,iterations+1):
            matrix = i*(np.identity(i))
            for row in matrix:
                for entry in row:
                    sequence.append(int(entry))
        return sequence
Showing 1-2 of 2 results.