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.

A279891 Triangle read by rows, T(n,k) = 2*n, with n>=k>=0.

Original entry on oeis.org

0, 2, 2, 4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22
Offset: 0

Views

Author

Omar E. Pol, Dec 22 2016

Keywords

Comments

2*n appears n+1 times in row n.

Examples

			Triangle begins:
0;
2,  2;
4,  4,  4;
6,  6,  6,  6;
8,  8,  8,  8,  8;
10, 10, 10, 10, 10, 10;
12, 12, 12, 12, 12, 12, 12;
14, 14, 14, 14, 14, 14, 14, 14;
16, 16, 16, 16, 16, 16, 16, 16, 16;
18, 18, 18, 18, 18, 18, 18, 18, 18, 18;
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20;
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22;
...
		

Crossrefs

Twice A003056.
Row sums give A046092.
Where records occur gives A000217.
Column 0, and the right border: A005843.
Also row lengths of the following triangles: A237593, A262045, A262048, A279693.
Cf. A002024.

Programs

  • Mathematica
    Table[ConstantArray[2 n, n + 1], {n, 0, 11}] // Flatten (* Michael De Vlieger, Dec 22 2016 *)
    Table[#,#/2+1]&/@(2*Range[0,20])//Flatten(* Harvey P. Dale, Oct 09 2018 *)
  • PARI
    row(n) = vector(n, x, 2*(n-1))
    trianglerows(n) = for(k=1, n, print(row(k)))
    /* Print initial 12 rows of triangle as follows: */
    trianglerows(12) \\ Felix Fröhlich, Dec 22 2016

Formula

a(n) = 2*floor((sqrt(1+8*n)-1)/2).
a(n) = 2*A003056(n) = 2*(A002024(n+1)-1).