cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Keywords

Comments

Decreasing integers m to 0 followed by decreasing integers m+1 to 0, etc.
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
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
Riordan array (x/(1-x)^2, x). - Philippe Deléham, Feb 18 2012
a(n,k) = (A214604(n,k) - A214661(n,k)) / 2. - Reinhard Zumkeller, Jul 25 2012
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
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
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
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

Examples

			The triangle T(n, k) begins (note that one could use l <= k <= n, for any integer l, especially 1):
  n\k  0 1 2 3 4 5 6 7 8 9 10 ...
   0:  0
   1:  1 0
   2:  2 1 0
   3:  3 2 1 0
   4:  4 3 2 1 0
   5:  5 4 3 2 1 0
   6:  6 5 4 3 2 1 0
   7:  7 6 5 4 3 2 1 0
   8:  8 7 6 5 4 3 2 1 0
   9:  9 8 7 6 5 4 3 2 1 0
  10: 10 9 8 7 6 5 4 3 2 1 0
  ... [formatted by _Wolfdieter Lang_, May 12 2015]
		

References

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

Crossrefs

Cf. A141418 (partial sums per row).

Programs

  • Haskell
    a025581 n k = n - k
    a025581_row n = [n, n-1 .. 0]
    a025581_tabl = iterate (\xs@(x:_) -> (x + 1) : xs) [0]
    -- Reinhard Zumkeller, Aug 04 2014, Jul 22 2012, Mar 07 2011
    
  • Magma
    /* As triangle */ [[(n-k): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Sep 13 2015
    
  • Maple
    A025581 := n -> binomial(1+floor((1/2)+sqrt(2*(1+n))),2) - (n+1): seq(A025581(n), n=0..100);
  • Mathematica
    Flatten[NestList[Prepend[#, #[[1]]+1]&, {0}, 13]] (* Jean-François Alcover, May 17 2011 *)
    With[{nn=20},Flatten[Table[Join[{0},Reverse[Range[i]]],{i,nn}]]] (* Harvey P. Dale, Dec 31 2014 *)
    Table[Range[n,0,-1],{n,0,15}]//Flatten (* Harvey P. Dale, Aug 01 2020 *)
  • PARI
    a(n)=binomial(1+floor(1/2+sqrt(2+2*n)),2)-(n+1) /* produces a(n) */
    
  • PARI
    t1(n)=binomial(floor(3/2+sqrt(2+2*n)),2)-(n+1) /* A025581 */
    
  • PARI
    t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)),2) /* A002262 */
    
  • PARI
    apply( {A025581(n)=binomial(sqrtint(8*n+1)\/2+1,2)-n-1}, [0..90]) \\ M. F. Hasler, Dec 06 2019
    
  • Python
    from math import isqrt, comb
    def A025581(n): return comb((m:=isqrt(k:=n+1<<1))+(k>m*(m+1))+1,2)-n-1 # Chai Wah Wu, Nov 08 2024

Formula

T(n, k) = n-k, for 0 <= k <= n.
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.
a(n) = A004736(n+1) - 1.
G.f. for T(n,k): y / ((1-x)^2 * (1-x*y)). - Ralf Stephan, Jan 25 2005
For the cubic equation satisfied by T(n, k) see the comment on a problem by Viète above. - Wolfdieter Lang, May 12 2015
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
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
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
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

Extensions

Typo in definition corrected by Arkadiusz Wesolowski, Nov 24 2011
Edited (part of name moved to first comment; definition of trinv added in formula) by Wolfdieter Lang, May 12 2015

A076110 Triangle (read by rows) in which the n-th row contains first n terms of an arithmetic progression with first term 1 and common difference (n-1).

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 4, 7, 10, 1, 5, 9, 13, 17, 1, 6, 11, 16, 21, 26, 1, 7, 13, 19, 25, 31, 37, 1, 8, 15, 22, 29, 36, 43, 50, 1, 9, 17, 25, 33, 41, 49, 57, 65, 1, 10, 19, 28, 37, 46, 55, 64, 73, 82, 1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 101, 1, 12, 23, 34, 45, 56, 67, 78, 89, 100, 111, 122
Offset: 1

Views

Author

Amarnath Murthy, Oct 09 2002

Keywords

Comments

Leading diagonal contains n^2 + 1 (A002522).
Sum of the n-th row is (n+1)(n^2+2)/2 (A064808).

Examples

			1;
1, 2;
1, 3, 5;
1, 4, 7, 10;
1, 5, 9, 13, 17;
1, 6, 11, 16, 21, 26;
1, 7, 13, 19, 25, 31, 37; ...
		

Crossrefs

Cf. A002522, A064808, A076111 (row products), A079904.

Programs

  • GAP
    Flat(List([1..12],n->List([1..n],k->1+(n-1)*(k-1)))); # Muniru A Asiru, Dec 05 2018
    
  • Magma
    /* As triangle */ [[1+(n-1)*(k-1): k in [1..n]]: n in [1.. 12]]; // Vincenzo Librandi, Dec 05 2018
  • Maple
    T:= (n,k) -> 1+(n-1)*(k-1):for n from 1 to 10 do seq(T(n,k),k=1..n) od; # Robert Israel, Dec 04 2018
  • Mathematica
    T[n_, k_] := 1 + (n-1) * (k-1); Table[T[n, k], {n,1,10}, {k,1,n}] // Flatten (* Amiram Eldar, Dec 04 2018 *)

Formula

A076110(n) = L(n) with L=seq(seq(n*k+1, k = 0..n), n = 0..+inf). - Yalcin Aktar, Jul 14 2009
From Robert Israel, Dec 04 2018: (Start)
T(n,k) = 1 + (n-1)*(k-1).
G.f. as triangle: (1-x-x*y+2*x^2*y+2*x^2*y^2-3*x^3*y^2)*x*y/((1-x)^2*(1-x*y)^3).
G.f. as sequence: x/(1-x) + Sum_{m>=0} (-m*(m+1)*x^((m^2+3*m+4)/2) + (1+m*(m+1))*x^((m^2+3*m+6)/2))/(1-x)^2.
(End)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003

A257238 Triangle T(n, k) = n^3 - k^3, 0 <= k < = n.

Original entry on oeis.org

0, 1, 0, 8, 7, 0, 27, 26, 19, 0, 64, 63, 56, 37, 0, 125, 124, 117, 98, 61, 0, 216, 215, 208, 189, 152, 91, 0, 343, 342, 335, 316, 279, 218, 127, 0, 512, 511, 504, 485, 448, 387, 296, 169, 0, 729, 728, 721, 702, 665, 604, 513, 386, 217, 0, 1000, 999, 992, 973, 936, 875, 784, 657, 488, 271, 0
Offset: 0

Views

Author

Wolfdieter Lang, May 12 2015

Keywords

Comments

See the comments in A025581 and A079904 on a problem by François Viète (Vieta)(1593). Regarding that problem, note the simple identity: n^3 - k^3 = (n - k)^3 + 3*n*k*(n - k), for n > = k >= 0.
Row sums give A126274(n-1) for n >= 1, and 0 for n=0.
Alternating row sums are ars(2*n) = ars(2*n-1) = (4*n-3)*n^2 = A103532(n-1), for n >= 1, and ars(0) = 0.

Examples

			The triangle T(n, k) begins:
  n\k    0   1   2   3   4   5   6   7   8   9  10
   0:    0
   1:    1   0
   2:    8   7   0
   3:   27  26  19   0
   4:   64  63  56  37   0
   5:  125 124 117  98  61   0
   6:  216 215 208 189 152  91   0
   7:  343 342 335 316 279 218 127   0
   8:  512 511 504 485 448 387 296 169   0
   9:  729 728 721 702 665 604 513 386 217   0
  10: 1000 999 992 973 936 875 784 657 488 271   0
  ...
		

Crossrefs

Programs

  • Maple
    for n from 0 to 10 do seq(n^3-k^3,k=0..n) od; # Robert Israel, May 10 2018
  • Mathematica
    Table[n^3-k^3,{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, Jan 02 2021 *)

Formula

T(n, k) = A025581(n, k)*(A025581(n, k)^2 + 3* A079904(n, k)) (see the identity mentioned in a comment).
Columns (with one leading zero and offset 0): k=0: l^3 = A000578(l), k=1: (l+1)^3 - 1 = A068601(l+1), k=2: l*(l^2 + 6*l + 12), k=3: l*(l^2 + 9*l + 27), k=4: l*(l^2 + 12*l + 48), k=5: l*(l^2 + 15*l + 75), ...
G.f. for T(n,k): (1+4*x+4*x*y+x^2-14*x^2*y+x^2*y^2-2*x^3*y-2*x^3*y^2+7*x^4*y^2)*x/((1-x*y)^3*(1-x)^4). - Robert Israel, May 10 2018

A174995 Products of decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 54, 56, 63, 64, 72, 81
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 03 2010, Apr 05 2010

Keywords

Comments

Apart from the initial zero: finite subset of A002473 with 37 elements: a(37)=81=9*9;
a(n) = A079904(j,i) for certain i,j with 0<=i<=j<=9.

Programs

  • Mathematica
    Union[Times@@@Tuples[Range[0,9],2]] (* Harvey P. Dale, Oct 08 2011 *)
Showing 1-4 of 4 results.