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.

A147874 a(n) = (5*n-7)*(n-1).

Original entry on oeis.org

0, 3, 16, 39, 72, 115, 168, 231, 304, 387, 480, 583, 696, 819, 952, 1095, 1248, 1411, 1584, 1767, 1960, 2163, 2376, 2599, 2832, 3075, 3328, 3591, 3864, 4147, 4440, 4743, 5056, 5379, 5712, 6055, 6408, 6771, 7144, 7527, 7920, 8323, 8736, 9159, 9592, 10035
Offset: 1

Views

Author

Keywords

Comments

Zero followed by partial sums of A017305.
Appears to be related to various other sequences: a(n) = A036666(2*n-2) for n>1; a(n) = A115006(2*n-3) for n>1; a(n) = A118015(5*n-6) for n>1; a(n) = A008738(5*n-7) for n>1.
Even dodecagonal numbers divided by 4. - Omar E. Pol, Aug 19 2011

Crossrefs

Cf. A017305 (10n+3), A036666, A115006, A118015 (floor(n^2/5)), A008738 (floor((n^2+1)/5)), A294830.
Cf. A051624, A193872. - Omar E. Pol, Aug 19 2011

Programs

  • GAP
    List([1..50], n-> (5*n-7)*(n-1)); # G. C. Greubel, Jul 30 2019
  • Magma
    [ 0 ] cat [ &+[ 10*k+3: k in [0..n-1] ]: n in [1..50] ]; // Klaus Brockhaus, Nov 17 2008
    
  • Magma
    [ 5*n^2-2*n: n in [0..50] ];
    
  • Mathematica
    s=0;lst={s};Do[s+=n++ +3;AppendTo[lst,s],{n,0,6!,10}];lst
    Table[5n^2-12n+7,{n,50}] (* or *) LinearRecurrence[{3,-3,1},{0,3,16},50] (* or *) PolygonalNumber[12,Range[0,100,2]]/4 (* Harvey P. Dale, Aug 08 2021 *)
  • PARI
    {m=50; a=7; for(n=0, m, print1(a=a+10*(n-1)+3, ","))} \\ Klaus Brockhaus, Nov 17 2008
    
  • Sage
    [(5*n-7)*(n-1) for n in (1..50)] # G. C. Greubel, Jul 30 2019
    

Formula

a(n) = Sum_{k=0..n-2} 10*k+3 = Sum_{k=0..n-2} A017305(k).
G.f.: x*(3 + 7*x)/(1-x)^3.
a(n) = 10*(n-2) + 3 + a(n-1).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A193872(n-1)/4. - Omar E. Pol, Aug 19 2011
a(n+1) = A131242(10n+2). - Philippe Deléham, Mar 27 2013
E.g.f.: -7 + (7 - 7*x + 5*x^2)*exp(x). - G. C. Greubel, Jul 30 2019
Sum_{n>=2} 1/a(n) = A294830. - Amiram Eldar, Nov 15 2020
a(n) = A014105(n-1) + 3*A002378(n-2). - Leo Tavares, Mar 31 2025

Extensions

Edited by R. J. Mathar and Klaus Brockhaus, Nov 17 2008, Nov 20 2008

A114999 Array read by antidiagonals: T(m,n) = Sum_{i=1..m, j=1..n, gcd(i,j)=1} (m+1-i)*(n+1-j), m>=1, n>=1.

Original entry on oeis.org

1, 3, 3, 6, 8, 6, 10, 16, 16, 10, 15, 26, 31, 26, 15, 21, 39, 50, 50, 39, 21, 28, 54, 75, 80, 75, 54, 28, 36, 72, 103, 120, 120, 103, 72, 36, 45, 92, 137, 164, 179, 164, 137, 92, 45, 55, 115, 175, 218, 244, 244, 218, 175, 115, 55, 66, 140, 218, 278, 324, 332, 324, 278, 218, 140
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2006

Keywords

Comments

The corresponding triangle is A320541, counting (1/4) * number of ways to select 3 distinct points forming a triangle of unsigned area = 1/2 from a rectangle of grid points with side lengths j and k, written as triangle T(j,k), j<=k. - Hugo Pfoertner, Oct 22 2018

Examples

			The top left corner of the array is:
[1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78]
[3, 8, 16, 26, 39, 54, 72, 92, 115, 140, 168, 198]
[6, 16, 31, 50, 75, 103, 137, 175, 218, 265, 318, 374]
[10, 26, 50, 80, 120, 164, 218, 278, 346, 420, 504, 592]
[15, 39, 75, 120, 179, 244, 324, 413, 514, 623, 747, 877]
[21, 54, 103, 164, 244, 332, 441, 562, 699, 846, 1014, 1190]
[28, 72, 137, 218, 324, 441, 585, 745, 926, 1120, 1342, 1575]
[36, 92, 175, 278, 413, 562, 745, 948, 1178, 1424, 1706, 2002]
[45, 115, 218, 346, 514, 699, 926, 1178, 1463, 1768, 2118, 2485]
[55, 140, 265, 420, 623, 846, 1120, 1424, 1768, 2136, 2559, 3002]
[66, 168, 318, 504, 747, 1014, 1342, 1706, 2118, 2559, 3065, 3595]
[78, 198, 374, 592, 877, 1190, 1575, 2002, 2485, 3002, 3595, 4216]
...
		

Crossrefs

Cf. A114043, A115004 (main diagonal), A115005, A115006, A115007, A320541.

Programs

  • Maple
    T:=proc(m,n) local t1,i,j; t1:=0; for i from 1 to m do for j from 1 to n do if gcd(i,j)=1 then t1:=t1+(m+1-i)*(n+1-j); fi; od; od; t1; end;
  • Mathematica
    T[m_, n_] := Module[{t1, i, j}, t1 = 0; For[i = 1, i <= m, i++, For[j = 1, j <= n, j++, If[GCD[i, j] == 1 , t1 = t1 + (m+1-i)*(n+1-j)]]]; t1]; Table[T[m-n+1, n], {m, 1, 11}, {n, 1, m}] // Flatten (* Jean-François Alcover, Jan 07 2014, translated from Maple *)

A115009 Array read by antidiagonals: let V(m,n) = Sum_{i=1..m, j=1..n, gcd(i,j)=1} (m+1-i)*(n+1-j), then T(m,n) = 2*m*n+m+n+2*V(m,n), for m >= 0, n >= 0.

Original entry on oeis.org

0, 1, 1, 2, 6, 2, 3, 13, 13, 3, 4, 22, 28, 22, 4, 5, 33, 49, 49, 33, 5, 6, 46, 74, 86, 74, 46, 6, 7, 61, 105, 131, 131, 105, 61, 7, 8, 78, 140, 188, 200, 188, 140, 78, 8, 9, 97, 181, 251, 289, 289, 251, 181, 97, 9, 10, 118, 226, 326, 386, 418, 386, 326, 226, 118, 10, 11, 141, 277
Offset: 0

Views

Author

N. J. A. Sloane, Feb 24 2006

Keywords

Comments

This is the number of linear partitions of an m X n grid.

Examples

			The array begins:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
1, 6, 13, 22, 33, 46, 61, 78, 97, 118, ...
2, 13, 28, 49, 74, 105, 140, 181, 226, 277, ...
3, 22, 49, 86, 131, 188, 251, 326, 409, 502, ...
4, 33, 74, 131, 200, 289, 386, 503, 632, 777, ...
5, 46, 105, 188, 289, 418, 559, 730, 919, 1132, ...
6, 61, 140, 251, 386, 559, 748, 979, 1234, 1521, ...
7, 78, 181, 326, 503, 730, 979, 1282, 1617, 1994, ...
...
		

References

  • D. M. Acketa, J. D. Zunic: On the number of linear partitions of the (m,n)-grid. Inform. Process. Lett., 38 (3) (1991), 163-168. See Table A.1.
  • Jovisa Zunic, Note on the number of two-dimensional threshold functions, SIAM J. Discrete Math. Vol. 25 (2011), No. 3, pp. 1266-1268. See Equation (1.2).

Crossrefs

The second and third rows are A028872 and A358296.
The main diagonal is A141255 = A114043 - 1.
The lower triangle is A332351.

Programs

  • Maple
    V:=proc(m,n) local t1,i,j; t1:=0; for i from 1 to m do for j from 1 to n do if gcd(i,j)=1 then t1:=t1+(m+1-i)*(n+1-j); fi; od; od; t1; end; T:=(m,n)->(2*m*n+m+n+2*V(m,n));
  • Mathematica
    V[m_, n_] := Sum[If[GCD[i, j] == 1, (m-i+1)*(n-j+1), 0], {i, 1, m}, {j, 1, n}]; T[m_, n_] := 2*m*n+m+n+2*V[m, n]; Table[T[m-n, n], {m, 0, 11}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jan 08 2014 *)

A115010 Array read by antidiagonals: let V(m,n) = Sum_{i=1..m, j=1..n, gcd(i,j)=1} (m+1-i)*(n+1-j), then T(m,n) = 2*m*n+m+n+2*V(m,n), for m >= 1, n >= 1.

Original entry on oeis.org

6, 13, 13, 22, 28, 22, 33, 49, 49, 33, 46, 74, 86, 74, 46, 61, 105, 131, 131, 105, 61, 78, 140, 188, 200, 188, 140, 78, 97, 181, 251, 289, 289, 251, 181, 97, 118, 226, 326, 386, 418, 386, 326, 226, 118, 141, 277, 409, 503, 559, 559, 503, 409, 277, 141, 166, 332, 502, 632, 730
Offset: 1

Views

Author

N. J. A. Sloane, Feb 24 2006

Keywords

Crossrefs

Programs

  • Maple
    V:=proc(m,n) local t1,i,j; t1:=0; for i from 1 to m do for j from 1 to n do if gcd(i,j)=1 then t1:=t1+(m+1-i)*(n+1-j); fi; od; od; t1; end; T:=(m,n)->(2*m*n+m+n+2*V(m,n));
  • Mathematica
    V[m_, n_] := Sum[Boole[CoprimeQ[i, j]]*(m-i+1)*(n-j+1), {i, m}, {j, n}];
    T[m_, n_] := 2*m*n + m + n + 2*V[m, n];
    Table[T[m - n + 1, n], {m, 1, 12}, {n, 1, m}] // Flatten (* Jean-François Alcover, Nov 28 2017 *)
Showing 1-4 of 4 results.