A220073 Mirror of the triangle A130517.
1, 1, 2, 2, 1, 3, 3, 1, 2, 4, 4, 2, 1, 3, 5, 5, 3, 1, 2, 4, 6, 6, 4, 2, 1, 3, 5, 7, 7, 5, 3, 1, 2, 4, 6, 8, 8, 6, 4, 2, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 12, 10, 8, 6, 4, 2
Offset: 1
Examples
From _Boris Putievskiy_, Jan 15 2013: (Start) The start of the sequence as table: 1..1..2..3..4..5..6..7... 2..1..1..2..3..4..5..6... 3..2..1..1..2..3..4..5... 4..3..2..1..1..2..3..4... 5..4..3..2..1..1..2..3... 6..5..4..3..2..1..1..2... 7..6..5..4..3..2..1..1... 8..7..6..5..4..3..2..1... . . . The start of the sequence as triangle array read by rows: 1, 1, 2, 2, 1, 3, 3, 1, 2, 4, 4, 2, 1, 3, 5, 5, 3, 1, 2, 4, 6, 6, 4, 2, 1, 3, 5, 7, 7, 5, 3, 1, 2, 4, 6, 8, . . . Row number r contains r numbers: r-1, r-3,...,1,...r-2,r. (End)
Links
- Reinhard Zumkeller, Rows n = 1..120 of triangle, flattened
- Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
Crossrefs
Programs
-
Haskell
a220073 n k = a220073_tabl !! (n-1) !! (k-1) a220073_row n = a220073_tabl !! (n-1) a220073_tabl = map reverse a130517_tabl
-
Mathematica
max = 13; row[n_] := Join[Range[n, 1, -1], Range[max - n + 1]]; T = Array[row, max]; Table[T[[n - k + 1, k]], {n, 1, max}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Sep 11 2017 *)
Formula
T(1,1)=1, for n>1: T(n,k)=T(n-1,n-k+1), 1<=k
From Boris Putievskiy, Jan 15 2013: (Start)
For the general case
a(n) = |(t+1)^2 - 2n| + m*floor((t^2+3t+2-2n)/(t+1)),
where t = floor((-1+sqrt(8*n-7))/2).
For m = 2
a(n) = |(t+1)^2 - 2n| + floor((t^2+3t+2-2n)/(t+1)),
where t=floor((-1+sqrt(8*n-7))/2). (End)
Comments