A144328 A002260 preceded by a column of 1's: a (1, 1, 2, 3, 4, 5, ...) crescendo triangle by rows.
1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Offset: 1
Examples
First few rows of the triangle: 1; 1, 1; 1, 1, 2; 1, 1, 2, 3; 1, 1, 2, 3, 4; 1, 1, 2, 3, 4, 5; ...
Links
- Reinhard Zumkeller, Rows n = 1..100 of triangle, flattened
- Boris Putievskiy, Transformations Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
Programs
-
Haskell
a144328 n k = a144328_tabl !! (n-1) !! (k-1) a144328_row n = a144328_tabl !! (n-1) a144328_tabl = [1] : map (\xs@(x:_) -> x : xs) a002260_tabl -- Reinhard Zumkeller, Apr 29 2015
-
Mathematica
Flatten[Table[Join[{1},Range[n]],{n,0,11}]] (* Harvey P. Dale, Aug 10 2013 *)
-
Python
from math import comb, isqrt def A144328(n): return n-comb((m:=isqrt(k:=n<<1))+(k>m*(m+1)),2)-(comb(isqrt(n-1<<1)+1,2)!=n-1) # Chai Wah Wu, Nov 08 2024
Formula
Triangle A002260 (natural numbers crescendo triangle) preceded by a column of 1's, = a (1, 1, 2, 3, 4, 5, ...) crescendo triangle by rows.
a(n) = A028310(m-1), where m = n-t*(t+1)/2, t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 13 2012
Comments