login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025581 Triangle read by rows: T(n, k) = n-k, for 0 <= k <= n. 156

%I #118 Aug 14 2022 15:27:35

%S 0,1,0,2,1,0,3,2,1,0,4,3,2,1,0,5,4,3,2,1,0,6,5,4,3,2,1,0,7,6,5,4,3,2,

%T 1,0,8,7,6,5,4,3,2,1,0,9,8,7,6,5,4,3,2,1,0,10,9,8,7,6,5,4,3,2,1,0,11,

%U 10,9,8,7,6,5,4,3,2,1,0,12,11,10,9,8,7,6,5,4,3,2,1,0,13,12,11,10,9,8,7,6,5,4,3

%N Triangle read by rows: T(n, k) = n-k, for 0 <= k <= n.

%C Decreasing integers m to 0 followed by decreasing integers m+1 to 0, etc.

%C The point with coordinates (x = A025581(n), y = A002262(n)) sweeps out the first quadrant by upwards antidiagonals. _N. J. A. Sloane_, Jul 17 2018

%C The PARI functions t1, t2 can be used to read a square array T(n,k) (n >= 0, k >= 0) by antidiagonals upwards: n -> T(t1(n), t2(n)). - _Michael Somos_, Aug 23 2002

%C Riordan array (x/(1-x)^2, x). - _Philippe Deléham_, Feb 18 2012

%C a(n,k) = (A214604(n,k) - A214661(n,k)) / 2. - _Reinhard Zumkeller_, Jul 25 2012

%C Sequence B is called a reverse reluctant sequence of sequence A if B is a triangular array read by rows such that row number k lists the first k terms of the sequence A in reverse order. This sequence is the reverse reluctant sequence of sequence 0,1,2,3,..., the nonnegative integers A001477. - _Boris Putievskiy_, Dec 13 2012

%C A problem posed by François Viète (Vieta) in his book Zeteticorum liber quinque (1593), liber 2, problem 19 (quoted in the Alten et al. reference, on p. 292) is to find for a rectangle (a >= b >= 1) with given a^3 - b^3, name it C, and a*b, name it F, the difference a-b, name it x. This is a simple exercise which Viète found remarkable. It reduces to a standard cubic equation for x, namely x^3 + 3*F*x = C. Proof: Use the square of the diagonal d^2 = a^2 + b^2. Then (i) C = a^3 - b^3 = (a - b)*(a^2 + b^2 + a*b) = x*(d^2 + F). (ii) use the trivial relation d^2 = (a-b)^2 + 2*a*b = x^2 + 2*F, to eliminate d^2 in (i). End of the Proof. Here for positive integers a = n and b = k: (T(n, k)^2 + 3*A079904(n, k))*T(n, k) = A257238(n, k) (also true for n = k = 0). - _Wolfdieter Lang_, May 12 2015

%C See a comment on A051162 on the cubic equation for S = a+b in terms of Cplus = a^3 + b^3 and D = a - b. This equation leads to a - b = sqrt((4*Cplus -S^3)/(3*S)). - _Wolfdieter Lang_, May 15 2015

%C The entries correspond to the first of the 2 coordinates of the Cantor Pairs, specifically x=w-(CPKey-(w^2+w)/2), where w=floor((sqrt(8*CPKey+1)-1)/2) and CPKey=Cantor Pair key (A001477). The second of the coordinate pairs is A002262. - _Bill McEachen_, Sep 12 2015

%D H.-W. Alten et al., 4000 Jahre Algebra, 2. Auflage, Springer, 2014, p. 203.

%H Reinhard Zumkeller, <a href="/A025581/b025581.txt">Rows n = 0..100 of triangle, flattened</a>

%H Ângela Mestre and José Agapito, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL22/Mestre/mestre2.html">Square Matrices Generated by Sequences of Riordan Arrays</a>, J. Int. Seq., Vol. 22 (2019), Article 19.8.4.

%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012.

%H Michael Somos, <a href="/A073189/a073189.txt">Sequences used for indexing triangular or square arrays</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>.

%F T(n, k) = n-k, for 0 <= k <= n.

%F As a sequence: a(n) = (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n), with trinv(n) = floor((1+sqrt(1+8*n))/2). Cf. A002262.

%F a(n) = A004736(n+1) - 1.

%F G.f. for T(n,k): y / ((1-x)^2 * (1-x*y)). - _Ralf Stephan_, Jan 25 2005

%F For the cubic equation satisfied by T(n, k) see the comment on a problem by Viète above. - _Wolfdieter Lang_, May 12 2015

%F G.f. for a(n): -(1-x)^(-2) + (1-x)^(-1) * Sum_{n>=0} (n+1)*x^(n*(n+1)/2)). The sum is related to Jacobi theta functions. - _Robert Israel_, May 12 2015

%F T(n, k) = sqrt((4*A105125(n, k) - A051162(n, k)^3)/(3*A051162(n, k))). See a comment above. - _Wolfdieter Lang_, May 15 2015

%F a(n) = (1/2)*(t^2 + t - 2*n - 2), where t = floor(sqrt(2*n+1) + 1/2) = round(sqrt(2*n+1)). - _Ridouane Oudra_, Dec 01 2019

%F a(n) = ((1/2) * ceiling((-1 + sqrt(9 + 8 * n))/2) * ceiling((1 + sqrt(9 + 8 * n))/2)) - n - 1. - _Ryan Jean_, Apr 22 2022

%e The triangle T(n, k) begins (note that one could use l <= k <= n, for any integer l, especially 1):

%e n\k 0 1 2 3 4 5 6 7 8 9 10 ...

%e 0: 0

%e 1: 1 0

%e 2: 2 1 0

%e 3: 3 2 1 0

%e 4: 4 3 2 1 0

%e 5: 5 4 3 2 1 0

%e 6: 6 5 4 3 2 1 0

%e 7: 7 6 5 4 3 2 1 0

%e 8: 8 7 6 5 4 3 2 1 0

%e 9: 9 8 7 6 5 4 3 2 1 0

%e 10: 10 9 8 7 6 5 4 3 2 1 0

%e ... [formatted by _Wolfdieter Lang_, May 12 2015]

%p A025581 := n -> binomial(1+floor((1/2)+sqrt(2*(1+n))),2) - (n+1): seq(A025581(n), n=0..100);

%t Flatten[NestList[Prepend[#, #[[1]]+1]&, {0}, 13]] (* _Jean-François Alcover_, May 17 2011 *)

%t With[{nn=20},Flatten[Table[Join[{0},Reverse[Range[i]]],{i,nn}]]] (* _Harvey P. Dale_, Dec 31 2014 *)

%t Table[Range[n,0,-1],{n,0,15}]//Flatten (* _Harvey P. Dale_, Aug 01 2020 *)

%o (PARI) a(n)=binomial(1+floor(1/2+sqrt(2+2*n)),2)-(n+1) /* produces a(n) */

%o (PARI) t1(n)=binomial(floor(3/2+sqrt(2+2*n)),2)-(n+1) /* A025581 */

%o (PARI) t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)),2) /* A002262 */

%o (PARI) apply( {A025581(n)=binomial(sqrtint(8*n+1)\/2+1,2)-n-1}, [0..90]) \\ _M. F. Hasler_, Dec 06 2019

%o (Haskell)

%o a025581 n k = n - k

%o a025581_row n = [n, n-1 .. 0]

%o a025581_tabl = iterate (\xs@(x:_) -> (x + 1) : xs) [0]

%o -- _Reinhard Zumkeller_, Aug 04 2014, Jul 22 2012, Mar 07 2011

%o (Magma) /* As triangle */ [[(n-k): k in [1..n]]: n in [1.. 15]]; // _Vincenzo Librandi_, Sep 13 2015

%Y Cf. A025669, A025676, A025683, A002262, A004736, A001477.

%Y Cf. A141418 (partial sums per row).

%Y Cf. A079904, A257238, A051162, A105125.

%K nonn,tabl,easy,nice

%O 0,4

%A _David W. Wilson_

%E Typo in definition corrected by _Arkadiusz Wesolowski_, Nov 24 2011

%E Edited (part of name moved to first comment; definition of trinv added in formula) by _Wolfdieter Lang_, May 12 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)