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

A082652 Triangle read by rows: T(n,k) is the number of squares that can be found in a k X n rectangular grid of little squares, for 1 <= k <= n.

Original entry on oeis.org

1, 2, 5, 3, 8, 14, 4, 11, 20, 30, 5, 14, 26, 40, 55, 6, 17, 32, 50, 70, 91, 7, 20, 38, 60, 85, 112, 140, 8, 23, 44, 70, 100, 133, 168, 204, 9, 26, 50, 80, 115, 154, 196, 240, 285, 10, 29, 56, 90, 130, 175, 224, 276, 330, 385, 11, 32, 62, 100, 145, 196, 252, 312, 375, 440, 506
Offset: 1

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), May 16 2003

Keywords

Comments

Here the squares being counted have sides parallel to the gridlines; for all squares, see A130684.
T(n,k) also is the total number of balls in a pyramid of balls on an n X k rectangular base. - N. J. A. Sloane, Nov 17 2007. For example, if the base is 4 X 2, the total number of balls is 4*2 + 3*1 = 11 = T(4,2).
Row sums give A001296. - Vincenzo Librandi Mar 26 2019

Examples

			Let X represent a small square. Then T(3,2) = 8 because here
  XXX
  XXX
we can see 8 squares, 6 of side 1, 2 of side 2.
Triangle begins:
  1
  2   5
  3   8  14
  4  11  20  30
  5  14  26  40  55
  6  17  32  50  70  91
  7  20  38  60  85 112 140
  ...
		

Crossrefs

Cf. A083003, A083487. Right side of triangle gives A000330.
Main diagonal is A000330, row sums are A001296. - Paul D. Hanna and other correspondents, May 28 2003

Programs

  • Magma
    /* As triangle */ [[(k+3*k*n+3*k^2*n-k^3)/6: k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Mar 26 2019
  • Maple
    f:=proc(m,n) add((m-i)*(n-i),i=0..min(m,n)); end;
  • Mathematica
    T[n_, k_] := Sum[(n-i)(k-i), {i, 0, Min[n, k]}];
    Table[T[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 25 2019 *)

Formula

T(n, k) = ( k + 3*k*n + 3*k^2*n - k^3 ) / 6.
T(n, k) = Sum_{i=0..min(n,k)} (n-i)*(k-i). - N. J. A. Sloane, Nov 17 2007
G.f.: (1+x*y-2*x^2*y)*x*y/((1-x*y)^4*(1-x)^2). - Robert Israel, Dec 20 2017

Extensions

Edited by Robert Israel, Dec 20 2017

A162254 a(n) = n*(2*n^2 + 5*n + 1)/2.

Original entry on oeis.org

4, 19, 51, 106, 190, 309, 469, 676, 936, 1255, 1639, 2094, 2626, 3241, 3945, 4744, 5644, 6651, 7771, 9010, 10374, 11869, 13501, 15276, 17200, 19279, 21519, 23926, 26506, 29265, 32209, 35344, 38676, 42211, 45955, 49914, 54094, 58501, 63141
Offset: 1

Views

Author

Vincenzo Librandi, Jun 29 2009

Keywords

Comments

Row sums from A083487.
Row 2 of the convolution array A213831. - Clark Kimberling, Jul 04 2012
Number of CNF statements for checking whether a 3-colored n X n grid has no monochromatic L. See Mammel et al. - Michel Marcus, Feb 10 2025

Programs

  • Mathematica
    LinearRecurrence[{4,-6,4,-1}, {4, 19, 51, 106}, 50] (* or *) CoefficientList[Series[(4+3*x-x^2)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Mar 04 2012 *)
  • PARI
    a(n)=n*(5*n+1)/2+n^3 \\ Charles R Greathouse IV, Jan 11 2012

Formula

From Vincenzo Librandi, Mar 04 2012: (Start)
G.f.: x*(4 + 3*x - x^2)/(1-x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)

Extensions

New name from Charles R Greathouse IV, Jan 11 2012

A151890 Triangle read by rows: T(l,c) = 2*l*c + l + c (0 <= c <= l).

Original entry on oeis.org

0, 1, 4, 2, 7, 12, 3, 10, 17, 24, 4, 13, 22, 31, 40, 5, 16, 27, 38, 49, 60, 6, 19, 32, 45, 58, 71, 84, 7, 22, 37, 52, 67, 82, 97, 112, 8, 25, 42, 59, 76, 93, 110, 127, 144, 9, 28, 47, 66, 85, 104, 123, 142, 161, 180, 10, 31, 52, 73, 94, 115, 136, 157, 178, 199, 220, 11, 34, 57
Offset: 0

Views

Author

N. J. A. Sloane, Jul 23 2009

Keywords

Comments

T(n,m) is also the edge count of the (n+1) X (m+1) grid graph. - Eric W. Weisstein, Jul 21 2011

Examples

			Triangle begins:
  0;
  1,  4;
  2,  7, 12;
  3, 10, 17, 24;
  4, 13, 22, 31, 40;
  5, 16, 27, 38, 49, 60;
The 3 X 2 grid graph has 7 edges, which equals T(2,1).
The 4 X 4 grid graph has 24 edges, which equals T(3,3).
		

Crossrefs

See A083487 for another version.

Programs

  • Maple
    T:= (l, c)-> 2*l*c + l + c:
    seq(seq(T(l, c), c=0..l), l=0..14);  # Alois P. Heinz, Oct 10 2009
  • Mathematica
    Table[2 m n + m + n, {n, 0, 9}, {m, 0, n}]

Formula

a(n) = -t^3 + (3/2)*t^2 + (2*n+1/2)*t - n - 1, where t = floor(sqrt(2n+1)+1/2) = round(sqrt(2n+1)). - Ridouane Oudra, Dec 02 2019

Extensions

More terms from Alois P. Heinz, Oct 10 2009

A083003 Triangle read by rows in which each term represents the total area of all the squares found in the grid described in sequence A082652.

Original entry on oeis.org

1, 2, 8, 3, 14, 34, 4, 20, 54, 104, 5, 26, 74, 154, 259, 6, 32, 94, 204, 364, 560, 7, 38, 114, 254, 469, 756, 1092, 8, 44, 134, 304, 574, 952, 1428, 1968, 9, 50, 154, 354, 679, 1148, 1764, 2508, 3333, 10, 56, 174, 404, 784, 1344, 2100, 3048, 4158, 5368, 11, 62, 194
Offset: 1

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), May 30 2003

Keywords

Examples

			The triangle (with columns labeled c = 1, 2, ... and rows labeled l = 1, 2, ...) begins:
1
2 8
3 14 34
4 20 54 104
5 26 74 154 259
6 32 94 204 364 560
7 38 114 254 469 756 1092
8 44 134 304 574 952 1428 1968
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[(5l c^4+20l c^3+25l c^2+10l c+10c^2+8c-3c^5-10c^4- 5c^3)/60,{c,l}],{l,12}]] (* Harvey P. Dale, Aug 19 2011 *)

Formula

T(l, c) = ( 5*l*c^4 + 20*l*c^3 + 25*l*c^2 + 10*l*c + 10*c^2 + 8*c - 3*c^5 - 10*c^4 - 5*c^3 ) / 60

A155156 Triangle T(n, k) = 4*n*k + 2*n + 2*k, read by rows.

Original entry on oeis.org

8, 14, 24, 20, 34, 48, 26, 44, 62, 80, 32, 54, 76, 98, 120, 38, 64, 90, 116, 142, 168, 44, 74, 104, 134, 164, 194, 224, 50, 84, 118, 152, 186, 220, 254, 288, 56, 94, 132, 170, 208, 246, 284, 322, 360, 62, 104, 146, 188, 230, 272, 314, 356, 398, 440, 68, 114, 160, 206, 252, 298, 344, 390, 436, 482, 528
Offset: 1

Views

Author

Vincenzo Librandi, Jan 21 2009

Keywords

Comments

First column: A016933, second column: A017317, third column: A063151, fourth column: 2*A017209. - Vincenzo Librandi, Nov 21 2012

Examples

			Triangle begins:
   8;
  14,  24;
  20,  34,  48;
  26,  44,  62,  80;
  32,  54,  76,  98, 120;
  38,  64,  90, 116, 142, 168;
  44,  74, 104, 134, 164, 194, 224;
  50,  84, 118, 152, 186, 220, 254, 288;
  56,  94, 132, 170, 208, 246, 284, 322, 360;
  62, 104, 146, 188, 230, 272, 314, 356, 398, 440;
		

Crossrefs

Programs

  • Magma
    [4*n*k + 2*n + 2*k : k in [1..n], n in [1..11]]; // Vincenzo Librandi, Nov 21 2012
    
  • Maple
    seq(seq( 2*(2*n*k +n+k), k=1..n), n=1..15); # G. C. Greubel, Mar 20 2021
  • Mathematica
    T[n_,k_]:=4*n*k +2*n +2*k; Table[T[n, k], {n, 15}, {k, n}]//Flatten (* Vincenzo Librandi, Nov 21 2012 *)
  • Sage
    flatten([[2*(2*n*k +n+k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 20 2021

Formula

T(n, k) = 2*A083487(n, k). - R. J. Mathar, Jan 05 2011
Sum_{k=0..n} T(n,k) = n*(2*n^2 + 5*n + 1) = 2*A162254(n) = A163832(n). - G. C. Greubel, Mar 20 2021

Extensions

Edited by Robert Hochberg, Jun 21 2010

A120023 Numbers k such that 2*6^k + 1 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 11, 17, 20, 28, 41, 48, 57, 58, 59, 71, 208, 972, 993, 1432, 2001, 2175, 2622, 3419, 3720, 4860, 7300, 7402, 14988, 15774, 18510, 22872, 52139, 77028, 149025, 172170, 239699
Offset: 1

Views

Author

Pierre CAMI, Jun 04 2006

Keywords

Comments

If 6^n is of the form T(x,y) = 2xy+x+y [A083487] then 2*6^n+1 is not prime. - Vincenzo Librandi, Nov 13 2010
a(1)-a(37) proven prime by the primality proving program LLR. - Robert Price, Jan 08 2016
a(38) > 2.5*10^5. - Robert Price, Jan 08 2016

Crossrefs

Programs

Extensions

More terms from Pierre CAMI, Jun 16 2006
a(32)-a(37) from Robert Price, Jan 08 2016

A162245 Triangle T(n,m) = 6*m*n + 3*m + 3*n + 1 read by rows.

Original entry on oeis.org

13, 22, 37, 31, 52, 73, 40, 67, 94, 121, 49, 82, 115, 148, 181, 58, 97, 136, 175, 214, 253, 67, 112, 157, 202, 247, 292, 337, 76, 127, 178, 229, 280, 331, 382, 433, 85, 142, 199, 256, 313, 370, 427, 484, 541, 94, 157, 220, 283, 346, 409, 472, 535, 598, 661
Offset: 1

Views

Author

Vincenzo Librandi, Jun 28 2009

Keywords

Comments

If h belongs to the main diagonal of the triangle then 6*h+3 is a square since T(n,n) = (3/2)*(2*n+1)^2-1/2 and 6*T(n,n)+3 = 9*(2*n+1)^2. Also, the first column is A017209 (after 4). - Vincenzo Librandi, Nov 20 2012

Examples

			Triangle begins:
13;
22, 37;
31, 52,  73;
40, 67,  94,  121;
49, 82,  115, 148, 181;
58, 97,  136, 175, 214, 253;
67, 112, 157, 202, 247, 292, 337;
76, 127, 178, 229, 280, 331, 382, 433; etc.
		

Crossrefs

Programs

  • Magma
    [6*n*k + 3*n + 3*k + 1:  k in [1..n],  n in [1..11]]; // Vincenzo Librandi, Nov 20 2012
  • Mathematica
    Flatten@Table[6*m*n + 3*m + 3*n + 1, {n, 20}, {m, n}] (* Vincenzo Librandi, Mar 03 2012 *)

Formula

Row sums: Sum_{m=1..n} T(n,m) = n*(5+6*n^2+15*n)/2. - R. J. Mathar, Jul 26 2009
T(n,m) = 3*A083487(n,m)+1. - R. J. Mathar, Jul 26 2009
T(k,k) = A003154(k+1) and T(k+1,k) = A163433(k+2). - Avi Friedlich, May 22 2015

Extensions

Edited by R. J. Mathar, Jul 26 2009

A172292 Triangle read by rows: T(n, k) = (2*n+1)*(2*k+1), n>=1, 1<=k<=n.

Original entry on oeis.org

9, 15, 25, 21, 35, 49, 27, 45, 63, 81, 33, 55, 77, 99, 121, 39, 65, 91, 117, 143, 169, 45, 75, 105, 135, 165, 195, 225, 51, 85, 119, 153, 187, 221, 255, 289, 57, 95, 133, 171, 209, 247, 285, 323, 361, 63, 105, 147, 189, 231, 273, 315, 357, 399, 441, 69, 115, 161
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2010

Keywords

Comments

A number m belongs to this sequence if and only if it is odd and composite.
First column: A016945(n, n>=1), second column: A017329(n, n>=2), third column: A147587(n, n>=3). - Vincenzo Librandi, Nov 20 2012
The number of occurrences of m corresponds to the number of nontrivial factorizations of m, i.e., A072670(m-1). - Daniel Forgues, Apr 22 2014

Examples

			Triangle begins:
9;
15, 25;
21, 35,  49;
27, 45,  63,  81;
33, 55,  77,  99,  121;
39, 65,  91,  117, 143, 169;
45, 75,  105, 135, 165, 195, 225;
51, 85,  119, 153, 187, 221, 255, 289;
57, 95,  133, 171, 209, 247, 285, 323, 361;
63, 105, 147, 189, 231, 273, 315, 357, 399, 441; etc.
Number of occurrences:
  63 = 9*7 = 21*3 has two nontrivial factorizations, thus occurs twice.
		

Crossrefs

Programs

  • Magma
    [4*n*k + 2*n + 2*k + 1: k in [1..n], n in [1..11]]; // Vincenzo Librandi, Nov 20 2012
  • Mathematica
    t[n_,k_]:= 4 n*k + 2n + 2k + 1; Table[t[n, k], {n,15}, {k, n}]//Flatten (* Vincenzo Librandi, Nov 20 2012 *)

Formula

T(n, k) = A144562(n,k)*2+3 read by rows. (Was old name.)
T(n, k) = 2*A083487(n, k)+1. - Daniel Forgues, Sep 20 2011
Showing 1-8 of 8 results.