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.

A284359 Double triangle (2*n+2 terms by row). Every row is 2*n + 1 followed by 2*n + 1 times 2*n + 2.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17
Offset: 0

Views

Author

Paul Curtz, Mar 25 2017

Keywords

Comments

In essence the same as A167991. - R. J. Mathar, Mar 27 2017

Examples

			1,  2,
3,  4,  4,  4,
5,  6,  6,  6,  6,  6,
7,  8,  8,  8,  8,  8,  8,  8,
9, 10, 10, 10, 10, 10, 10, 10, 10, 10,
... .
The row sum is A000466(n+1).
		

Crossrefs

Cf. A000466, A005408, A103517 (main diagonal), A167381.

Programs

  • Mathematica
    Table[2 n + 2 - Boole[k == 1], {n, 0, 8}, {k, 2 n + 2}] // Flatten (* Michael De Vlieger, Mar 25 2017 *)
  • PARI
    for(n=0, 10, for(k=1, 2*n + 2, print1(2*n + 2 - (k==1), ", ");); print();) \\ Indranil Ghosh, Mar 26 2017, translated from Mathematica code
    
  • Python
    for n in range(0, 11):
        print([2*n + 2 -(k==1) for k in range(1, 2*n + 3)])
    # Indranil Ghosh, Mar 26 2017

Formula

a(n) = A167381(n+1) - A167381(n).