A131818 A130296 + A002260 - A000012. Triangle read by rows: row n consists of n, 2, 3, 4, ..., n.
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
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; ...
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
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
Comments