This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A187760 Table T(n,k) read by antidiagonals. T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+2, if n < k. 7
 1, 3, 2, 4, 1, 3, 5, 3, 2, 4, 6, 4, 1, 3, 5, 7, 5, 3, 2, 4, 6, 8, 6, 4, 1, 3, 5, 7, 9, 7, 5, 3, 2, 4, 6, 8, 10, 8, 6, 4, 1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 2, 4, 6, 8, 10, 12, 10, 8, 6, 4, 1, 3, 5, 7, 9, 11 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS In general, let m be natural number. T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+m-1, if n 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m}  shifts the sequence A000027. For m=1 the result is A220073, for m=2 the result is A143182. This sequence is the result for m=3. LINKS Boris Putievskiy, Rows n = 1..140 of triangle, flattened Boris Putievskiy, Transformations Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012. FORMULA 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=3, a(n) = |(t+1)^2 - 2n| + 3*floor((t^2+3t+2-2n)/(t+1)), where t=floor((-1+sqrt(8*n-7))/2). EXAMPLE The start of the sequence as table for the general case: 1....m..m+1..m+2..m+3..m+4..m+5... 2....1....m..m+1..m+2..m+3..m+4... 3....2....1....m..m+1..m+2..m+3... 4....3....2....1....m..m+1..m+2... 5....4....3....2....1....m..m+1... 6....5....4....3....2....1....m... 7....6....5....4....3....2....1... . . . The start of the sequence as triangle array read by rows for the general case: 1; m,2; m+1,1,3; m+2,m,2,4; m+3,m+1,1,3,5; m+4,m+2,m,2,4,6; m+5,m+3,m+1,1,3,5,7; . . . Row number r contains r numbers: m+r-2, m+r-4,...r-2,r. MATHEMATICA T[n_, k_] := If[1 <= k <= n, n - k + 1, k - n + 2]; Table[T[n - k + 1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 06 2018 *) PROG (Python) t=int((math.sqrt(8*n-7)-1)/2) result=abs((t+1)**2 - 2*n) + 3*int((t**2+3*t+2-2*n)/(t+1)) CROSSREFS Cf. A000027, A220073, A143182. Sequence in context: A140430 A123359 A121885 * A122143 A144868 A134029 Adjacent sequences:  A187757 A187758 A187759 * A187761 A187762 A187763 KEYWORD nonn,tabl AUTHOR Boris Putievskiy, Jan 04 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 19 11:15 EST 2019. Contains 320310 sequences. (Running on oeis4.)