A128076 Triangle T(n,k) = 2*n-k, read by rows.
1, 3, 2, 5, 4, 3, 7, 6, 5, 4, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 13, 12, 11, 10, 9, 8, 7, 15, 14, 13, 12, 11, 10, 9, 8, 17, 16, 15, 14, 13, 12, 11, 10, 9, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11
Offset: 1
Examples
First few rows of the triangle are: 1; 3, 2; 5, 4, 3; 7, 6, 5, 4; 9, 8, 7, 6, 5; ...
Links
- Boris Putievskiy, Transformations [Of] Integer Sequences And Pairing Functions, arXiv preprint arXiv:1212.2732 [math.CO], 2012.
Crossrefs
Programs
-
Maple
A128076 := proc(n,k) 2*n-k ; end proc: seq(seq( A128076(n,k),k=1..n),n=1..12) ;# R. J. Mathar, Sep 27 2021
-
Mathematica
Table[(Round[Sqrt[2 n]]^2 + 3 Round[Sqrt[2 n]] - 2 n)/2, {n, 100}] (* Wesley Ivan Hurt, Sep 19 2021 *)
Formula
From Boris Putievskiy, Jan 24 2013: (Start)
For the general case:
a(n) = m*(t+1) + (m-1)*(t*(t+1)/2-n), where t=floor((-1+sqrt(8*n-7))/2).
For m = 2:
a(n) = 2*(t+1)+(t*(t+1)/2-n), where t=floor((-1+sqrt(8*n-7))/2). (End)
a(n) = (r^2 + 3*r - 2*n)/2, where r = round(sqrt(2*n)). - Wesley Ivan Hurt, Sep 19 2021
Extensions
NAME simplified. - R. J. Mathar, Sep 27 2021
Comments