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-5 of 5 results.

A049777 Triangular array read by rows: T(m,n) = n + n+1 + ... + m = (m+n)(m-n+1)/2.

Original entry on oeis.org

1, 3, 2, 6, 5, 3, 10, 9, 7, 4, 15, 14, 12, 9, 5, 21, 20, 18, 15, 11, 6, 28, 27, 25, 22, 18, 13, 7, 36, 35, 33, 30, 26, 21, 15, 8, 45, 44, 42, 39, 35, 30, 24, 17, 9, 55, 54, 52, 49, 45, 40, 34, 27, 19, 10, 66, 65, 63, 60, 56, 51, 45, 38, 30, 21, 11, 78, 77, 75, 72, 68, 63, 57, 50
Offset: 1

Views

Author

Keywords

Comments

Triangle read by rows, T(n,k) = A000217(n) - A000217(k), 0 <= k < n. - Philippe Deléham, Mar 07 2013
Subtriangle of triangle in A049780. - Philippe Deléham, Mar 07 2013
No primes and all composite numbers (except 2^x) are generated after the first two columns of the square array for this sequence. In other words, no primes and all composites except 2^x are generated when m-n >= 2. - Bob Selcoe, Jun 18 2013
Diagonal sums in the square array equal partial sums of squares (A000330). - Bob Selcoe, Feb 14 2014
From Bob Selcoe, Oct 27 2014: (Start)
The following apply to the triangle as a square array read by rows unless otherwise specified (see Table link);
Conjecture: There is at least one prime in interval [T(n,k), T(n,k+1)]. Since T(n,k+1)/T(n,k) decreases to (k+1)/k as n increases, this is true for k=1 ("Bertrand's Postulate", first proved by P. Chebyshev), k=2 (proved by El Bachraoui) and k=3 (proved by Loo).
Starting with T(1,1), The falling diagonal of the first 2 numbers in each column (read by column) are the generalized pentagonal numbers (A001318). That is, the coefficients of T(1,1), T(2,1), T(2,2), T(3,2), T(3,3), T(4,3), T(4,4) etc. are the generalized pentagonal numbers. These are A000326 and A005449 (Pentagonal and Second pentagonal numbers: n*(3*n+1)/2, respectively), interweaved.
Let D(n,k) denote falling diagonals starting with T(n,k):
Treating n as constant: pentagonal numbers of the form n*k + 3*k*(k-1)/2 are D(n,1); sequences A000326, 005449, A045943, A115067, A140090, A140091, A059845, A140672, A140673, A140674, A140675, A151542 are formed by n = 1 through 12, respectively.
Treating k as constant: D(1,k) are (3*n^2 + (4k-5)*n + (k-1)*(k-2))/2. When k = 2(mod3), D(1,k), is same as D(k+1,1) omitting the first (k-2)/3 numbers in the sequences. So D(1,2) is same as D(3,1); D(1,5) is same as D(6,1) omitting the 6; D(1,8) is same as D(9,1) omitting the 9 and 21; etc.
D(1,3) and D(1,4) are sequences A095794 and A140229, respectively.
(End)

Examples

			Rows: {1}; {3,2}; {6,5,3}; ...
Triangle begins:
   1;
   3,  2;
   6,  5,  3;
  10,  9,  7,  4;
  15, 14, 12,  9,  5;
  21, 20, 18, 15, 11,  6;
  28, 27, 25, 22, 18, 13,  7;
  36, 35, 33, 30, 26, 21, 15,  8;
  45, 44, 42, 39, 35, 30, 24, 17,  9;
  55, 54, 52, 49, 45, 40, 34, 27, 19, 10; ...
		

Crossrefs

Row sums = A000330.
Cf. A001318 (generalized pentagonal numbers).
Cf. A000326, 005449, A045943, A115067, A140090, A140091, A059845, A140672, A140673, A140674, A140675, A151542 (pentagonal numbers of form n*k + 3*k*(k-1)/2).

Programs

  • Magma
    /* As triangle */ [[(m+n)*(m-n+1) div 2: n in [1..m]]: m in [1.. 15]]; // Vincenzo Librandi, Oct 27 2014
  • Mathematica
    Flatten[Table[(n+k) (n-k+1)/2,{n,15},{k,n}]] (* Harvey P. Dale, Feb 27 2012 *)
  • PARI
    {T(n,k) = if( k<1 || nMichael Somos, Oct 06 2007 */
    

Formula

Partial sums of A002260 row terms, starting from the right; e.g., row 3 of A002260 = (1, 2, 3), giving (6, 5, 3). - Gary W. Adamson, Oct 23 2007
Sum_{k=0..n-1} (-1)^k*(2*k+1)*A000203(T(n,k)) = (-1)^(n-1)*A000330(n). - Philippe Deléham, Mar 07 2013
Read as a square array: T(n,k) = k*(k+2n-1)/2. - Bob Selcoe, Oct 27 2014

A160651 a(n) is the number of triangular nonnegative integers that are each equal to n(n+1)/2 - m(m+1)/2, for some m's where 0 <= m <= n.

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 4, 2, 4, 2, 4, 4, 2, 4, 2, 4, 4, 2, 4, 2, 3, 6, 2, 8, 2, 2, 4, 4, 8, 2, 2, 4, 2, 4, 2, 2, 8, 4, 4, 2, 4, 8, 2, 4, 4, 4, 6, 2, 4, 6, 2, 4, 4, 6, 4, 4, 4, 4, 6, 4, 2, 8, 4, 4, 4, 2, 8, 4, 4, 2, 2, 6, 2, 4, 4, 4, 4, 4, 12, 2, 4, 4, 2, 4, 2, 2, 8, 2, 8, 4, 2, 8, 4, 8, 4, 8, 8, 2, 4, 2, 2, 8, 2, 6, 2
Offset: 0

Views

Author

Leroy Quet, May 21 2009

Keywords

Examples

			For n = 6, the values of n(n+1)/2 - m(m+1)/2, 0 <= m <= n, are 21, 20, 18, 15, 11, 6, and 0. Of these, 21, 15, 6, and 0 are triangular numbers, so a(6) = 4.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(issqr(4*(n+m+1)*(n-m)+1), 1, 0), m=0..n):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 27 2018
  • PARI
    a(n) = sum(m=0, n, ispolygonal(n*(n+1)/2 - m*(m+1)/2, 3)); \\ Michel Marcus, May 27 2018

Formula

a(n) == 1 (mod 2) <=> n in { A001652 }. - Alois P. Heinz, May 27 2018

Extensions

Extended by Ray Chandler, Jun 16 2009

A271668 Triangle read by rows. The first column is A000217(n+1). From the second row we apply - A002262(n) for the following terms of the row.

Original entry on oeis.org

1, 3, 3, 6, 6, 5, 10, 10, 9, 7, 15, 15, 14, 12, 9, 21, 21, 20, 18, 15, 11, 28, 28, 27, 25, 22, 18, 13, 36, 36, 35, 33, 30, 26, 21, 15, 45, 45, 44, 42, 39, 35, 30, 24, 17, 55, 55, 54, 52, 49, 45, 40, 34, 27, 19, 66, 66, 65, 63, 60, 56, 51, 45, 38, 30, 21
Offset: 0

Views

Author

Paul Curtz, Apr 12 2016

Keywords

Comments

Row sums: A084990(n+1).
A158405(n) = A002262(n) + A002260(n). See the formula.
(Without its first column, A094728 is A120070, which could be built from positive A005563 and -A158894.)

Examples

			a(0) = 1, a(1) = 3, a(2) =3-0 = 3,  a(3) = 6, a(4) =6-0= 6, a(5) =6-1= 5, ... .
Triangle:
1,
3,   3,
6,   6,  5,
10, 10,  9,  7,
15, 15, 14, 12,  9,
21, 21, 20, 18, 15, 11,
28, 28, 27, 25, 22, 18, 13,
36, 36, 35, 33, 30, 26, 21, 15,
etc.
		

Crossrefs

Programs

  • Mathematica
    Table[(n^2 - n)/2 - Prepend[Accumulate@ Range[0, n - 3], 0], {n, 12}] // Flatten (* Michael De Vlieger, Apr 12 2016 *)

Formula

a(n) = A094728(n+1) - A049780(n).

A284551 Triangular array read by rows, demonstrating that the difference between a pentagonal number (left edge of triangle) and a square (right edge) is a triangular number.

Original entry on oeis.org

1, 5, 4, 12, 11, 9, 22, 21, 19, 16, 35, 34, 32, 29, 25, 51, 50, 48, 45, 41, 36, 70, 69, 67, 64, 60, 55, 49, 92, 91, 89, 86, 82, 77, 71, 64, 117, 116, 114, 111, 107, 102, 96, 89, 81, 145, 144, 142, 139, 135, 130, 124, 117, 109, 100, 176, 175, 173, 170, 166, 161, 155, 148, 140, 131, 121, 210, 209
Offset: 1

Views

Author

David Shane, Mar 29 2017

Keywords

Examples

			Rows: {1}; {5,4}; {12,11,9}; ...
Triangle begins:
               1
            5     4
        12    11     9
     22    21    19    16
  35    34    32    29    25
		

Crossrefs

Cf. A049777, A049780, which have a similar layout based on subtracting triangular numbers of increasing value from the leftmost element of the row.
A051662 gives row sums.

Programs

  • Maple
    A284551 := proc(n,m)
        n*(3*n-1)-m*(m-1) ;
        %/2 ;
    end proc:
    seq(seq(A284551(n,m),m=1..n),n=1..15) ; # R. J. Mathar, Mar 30 2017
  • Mathematica
    T[n_,m_]:= Floor[n(3n - 1) - m(m - 1)]/2; Table[T[n, k], {n, 12}, {k, n}] // Flatten (* Indranil Ghosh, Mar 30 2017 *)
  • PARI
    T(n,m) = floor(n*(3*n - 1) - m*(m - 1))/2;
    for(n=1, 12, for(k=1, n, print1(T(n,k),", ");); print();); \\ Indranil Ghosh, Mar 30 2017
    
  • Python
    def T(n, m): return (n*(3*n - 1) - m*(m - 1))//2
    for n in range(1, 13):
        print([T(n,k) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 30 2017

Formula

P(m,n) = (m(3m-1) - n(n-1))/2. Alternatively, P(n) - T(n-1) = S(n) where P(n) is a pentagonal number, T(n-1) is a triangular number, and S(n) is a square number.

A132169 Irregular triangle read by rows. A141616(n)/4.

Original entry on oeis.org

2, 3, 6, 4, 8, 5, 12, 10, 6, 15, 12, 7, 20, 18, 14, 8, 24, 21, 16, 9, 30, 28, 24, 18, 10, 35, 32, 27, 20, 11, 42, 40, 36, 30, 22, 12, 48, 45, 40, 33, 24, 13, 56, 54, 50, 44, 36, 26, 14, 63, 60, 55, 48, 39, 28, 15, 72, 70, 66, 60, 52, 42, 30, 16
Offset: 0

Views

Author

Paul Curtz, Aug 26 2008

Keywords

Comments

From Paul Curtz, Apr 14 2016: (Start)
Row sums: A023856.
Even rows: A120070.
Odd rows:
2,
6, 4,
12, 10, 6,
etc.
Divided by 2:
1,
3, 2,
6, 5, 3,
10, 9, 7, 4,
15, 14, 12, 9, 5,
etc.
This is A049777. Or positive A049780.
Also A271668 without the first column and bordered by the natural numbers as main diagonal.
(End)

Examples

			Irregular triangle:
2,
3,
6,   4,
8,   5,
12, 10, 6,
15, 12, 7,
20, 18, 14,  8,
24, 21, 16,  9,
30, 28, 24, 18, 10,
35, 32, 27, 20, 11,
etc.
		

Crossrefs

Programs

  • Mathematica
    (Table[n^2 - k^2, {n, 3, 18}, {k, n}] /. m_ /; Or[OddQ@ m, m == 0] -> Nothing)/4 // Flatten (* Michael De Vlieger, Apr 14 2016 *)

Extensions

Edited by Charles R Greathouse IV, Nov 11 2009
Showing 1-5 of 5 results.