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.

A131818 A130296 + A002260 - A000012. Triangle read by rows: row n consists of n, 2, 3, 4, ..., n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 2, 3, 4, 5, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Offset: 1

Views

Author

Gary W. Adamson, Jul 18 2007

Keywords

Comments

Row sums = A034856; (1, 4, 8, 13, 19, 26, 34, ...).

Examples

			First few rows of the triangle:
  1;
  2, 2;
  3, 2, 3;
  4, 2, 3, 4;
  5, 2, 3, 4, 5;
  6, 2, 3, 4, 5, 6;
  7, 2, 3, 4, 5, 6, 7;
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Join[{n},Range[2,n]],{n,15}]//Flatten (* Harvey P. Dale, Feb 24 2021 *)
  • PARI
    t(n, k) = if (k==1, n, k); \\ Michel Marcus, Feb 12 2014
    
  • Python
    from math import isqrt, comb
    def A131818(n):
        y = (m:=isqrt(k:=n-1<<1))+(k>m*(m+1))
        return n-comb(y,2) # Chai Wah Wu, Jul 07 2025

Formula

A130296 + A002260 - A000012 as infinite lower triangular matrices.
T(n, 1) = n, T(n, k) = k for k > 1. - Michel Marcus, Feb 12 2014

Extensions

More terms from Michel Marcus, Feb 12 2014