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.

Previous Showing 21-30 of 39 results. Next

A240444 Triangle T(n, k) = Number of ways to arrange k indistinguishable points on an n X n square grid so that no four of them are vertices of a square of any orientation.

Original entry on oeis.org

1, 1, 1, 4, 6, 4, 1, 9, 36, 84, 120, 96, 32, 1, 16, 120, 560, 1800, 4128, 6726, 7492, 5238, 1924, 232, 1, 25, 300, 2300, 12600, 52080, 166702, 416622, 808488, 1196196, 1306464, 1001364, 497940, 141336, 18208, 636, 1, 36, 630, 7140, 58800, 373632, 1895938, 7835492
Offset: 1

Views

Author

Heinrich Ludwig, May 07 2014

Keywords

Comments

The triangle is irregularly shaped: 0 <= k <= A240443(n). The first row corresponds to n = 1.
The maximal number of points that can be placed on an n X n square grid so that no four points are vertices of a square is A240443(n).

Examples

			The triangle begins:
  1,  1;
  1,  4,   6,   4;
  1,  9,  36,  84,  120,   96,   32;
  1, 16, 120, 560, 1800, 4128, 6726, 7492, 5238, 1924, 232;
...
		

Crossrefs

Cf. A240443, A000290 (column 2), A083374 (column 3), A178208 (column 4), A006857 (column 5 divided by 120), A240445 (column 6), A240446 (column 7).

A253650 Triangular numbers that are the product of a triangular number and a square number (both greater than 1).

Original entry on oeis.org

300, 1176, 3240, 7260, 14196, 25200, 29403, 41616, 64980, 97020, 139656, 195000, 228150, 265356, 353220, 461280, 592416, 749700, 936396, 1043290, 1155960, 1412040, 1708476, 2049300, 2438736, 2881200, 3381300, 3499335, 3943836, 4573800, 5276376, 6056940, 6921060, 7874496
Offset: 1

Views

Author

Antonio Roldán, Jan 07 2015

Keywords

Examples

			3240 is in the sequence because 3240 is triangular number (3240=80*81/2), and 3240=10*324=(4*5/2)*(18^2), product of triangular number 10 and square number 324.
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ@ Sqrt[8n + 1]; lst = Sort@ Flatten@ Outer[Times, Table[ n(n + 1)/2, {n, 2, 400}], Table[ n^2, {n, 2, 200}]]; Select[ lst, triQ] (* Robert G. Wilson v, Jan 13 2015 *)
  • PARI
    {i=3; j=3; while(i<=10^7, k=3; p=3; c=0; while(k1, c=k); if(c>0, print1(i, ", ")); k+=p; p+=1); i+=j; j+=1)}
    
  • PARI
    is(n)=if(!ispolygonal(n,3), return(0)); fordiv(core(n,1)[2], d, d>1 && ispolygonal(n/d^2,3) && n>d^2 && return(1)); 0 \\ Charles R Greathouse IV, Sep 29 2015
    
  • PARI
    list(lim)=my(v=List(),t,c); for(n=24,(sqrt(8*lim+1)-1)\2, t=n*(n+1)/2; c=core(n,1)[2]*core(n+1,1)[2]; if(valuation(t,2)\2 < valuation(c,2), c/=2); fordiv(c, d, if(d>1 && ispolygonal(t/d^2,3) && t>d^2, listput(v,t); break))); Vec(v) \\ Charles R Greathouse IV, Sep 29 2015

A241219 Number of ways to choose two points on a centered hexagonal grid of size n.

Original entry on oeis.org

0, 21, 171, 666, 1830, 4095, 8001, 14196, 23436, 36585, 54615, 78606, 109746, 149331, 198765, 259560, 333336, 421821, 526851, 650370, 794430, 961191, 1152921, 1371996, 1620900, 1902225, 2218671, 2573046, 2968266, 3407355, 3893445, 4429776, 5019696, 5666661
Offset: 1

Views

Author

Martin Renner, Apr 17 2014

Keywords

Comments

A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.
a(n) is also the number of segments on a centered hexagonal grid of size n.

Crossrefs

Programs

  • Magma
    [Binomial(3*n^2-3*n+1, 2): n in [1..35]]; // Vincenzo Librandi, Apr 19 2014
  • Maple
    seq(binomial(3*n^2-3*n+1, 2),n=1..34); # Martin Renner, Apr 27 2014
    op(PolynomialTools[CoefficientList](convert(series(-3*x^2*(7*x^2+22*x+7)/(x-1)^5, x=0, 35), polynom), x)[2..35]); # Martin Renner, Apr 27 2014
  • Mathematica
    CoefficientList[Series[-3 x^2 (7 x^2 + 22 x + 7)/(x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, Apr 19 2014 *)
  • PARI
    concat(0, Vec(-3*x^2*(7*x^2+22*x+7) / (x-1)^5 + O(x^100))) \\ Colin Barker, Apr 18 2014
    

Formula

a(n) = binomial(A003215(n-1), 2).
= binomial(3*n^2-3*n+1, 2).
= 3/2*n*(n-1)*(3*n^2-3*n+1).
= 9/2*n^4-9*n^3+6*n^2-3/2*n.
G.f.: -3*x^2*(7*x^2+22*x+7) / (x-1)^5. - Colin Barker, Apr 18 2014
Sum_{n>=2} 1/a(n) = 8/3 - 2*Pi*tanh(Pi/(2*sqrt(3)))/sqrt(3). - Amiram Eldar, Feb 17 2024

Extensions

Typo in Mathematica program fixed by Martin Renner, Apr 27 2014

A243645 Number of ways two L-tiles can be placed on an n X n square.

Original entry on oeis.org

0, 0, 0, 1, 20, 87, 244, 545, 1056, 1855, 3032, 4689, 6940, 9911, 13740, 18577, 24584, 31935, 40816, 51425, 63972, 78679, 95780, 115521, 138160, 163967, 193224, 226225, 263276, 304695, 350812, 401969, 458520, 520831, 589280, 664257, 746164, 835415, 932436
Offset: 0

Views

Author

Alois P. Heinz, Jun 08 2014

Keywords

Comments

This sequence also represents the number of edges added to G so that it is complete, where G is a graph of (n-1)^2 nodes arranged in a rhombus and embedded in the hexagonal lattice. G begins with A045944(n-2) edges and a(n) edges are added to form a complete graph. - John Tyler Rascoe, Sep 24 2022

Examples

			a(3) = 1:
._____.
|_| |_|
| |___|
|___|_| .
		

Crossrefs

Column k=2 of A243608.

Programs

  • Maple
    a:= n-> `if`(n<2, 0, ((((n-4)*n-1)*n+18)*n-16)/2):
    seq(a(n), n=0..50);
  • Mathematica
    CoefficientList[Series[x^3 (x^3+3x^2-15x-1)/(x-1)^5,{x,0,40}],x] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,0,0,1,20,87,244},40] (* Harvey P. Dale, Mar 06 2016 *)

Formula

G.f.: x^3*(x^3+3*x^2-15*x-1) / (x-1)^5.
a(n) = (n^4-4*n^3-n^2+18*n-16)/2 for n>=2, a(n) = 0 for n<2.
a(n) = A083374(n-1) - A045944(n-2) for n>=2. - John Tyler Rascoe, Sep 24 2022

A253285 a(n) = RF(n+1,3)*C(n+2,n-1), where RF(a,n) is the rising factorial.

Original entry on oeis.org

0, 24, 240, 1200, 4200, 11760, 28224, 60480, 118800, 217800, 377520, 624624, 993720, 1528800, 2284800, 3329280, 4744224, 6627960, 9097200, 12289200, 16364040, 21507024, 27931200, 35880000, 45630000, 57493800, 71823024, 89011440, 109498200, 133771200, 162370560
Offset: 0

Views

Author

Peter Luschny, Mar 23 2015

Keywords

Crossrefs

Programs

  • GAP
    List([0..40], n -> n*((n+1)*(n+2))^2*(n+3)/6); # Bruno Berselli, Mar 06 2018
    
  • Magma
    [n*((n+1)*(n+2))^2*(n+3)/6: n in [0..40]]; // Bruno Berselli, Mar 06 2018
    
  • Maple
    seq(n*((n+1)*(n+2))^2*(n+3)/6,n=0..19);
  • Mathematica
    Table[n ((n + 1) (n + 2))^2 (n + 3)/6, {n, 0, 40}] (* Bruno Berselli, Mar 06 2018 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,24,240,1200,4200,11760,28224},40] (* Harvey P. Dale, Aug 05 2024 *)
  • Python
    [n*((n+1)*(n+2))**2*(n+3)/6 for n in range(40)] # Bruno Berselli, Mar 06 2018
  • Sage
    [n*((n+1)*(n+2))^2*(n+3)/6 for n in (0..40)] # Bruno Berselli, Mar 06 2018
    

Formula

G.f.: -24/(x-1)^4 - 144/(x-1)^5 - 240/(x-1)^6 - 120/(x-1)^7. See the comment in A253284 for the general case.
a(n) = n*((n+1)*(n+2))^2*(n+3)/6.
a(n) = (N^3 + 4*N^2 + 4*N)/6 = N*(N + 2)^2/6 with N = n^2 + 3*n.
From Bruno Berselli, Mar 06 2018: (Start)
a(n) = 24*A006542(n+3) for n>0.
a(n) = Sum_{i=0..n} i*(i+1)^3*(i+2). Therefore, the first differences are in A133754. (End)

A253652 Triangular numbers that are the product of a triangular number and an oblong number.

Original entry on oeis.org

0, 6, 36, 120, 210, 300, 630, 1176, 2016, 3240, 3570, 4950, 7140, 7260, 10296, 14196, 19110, 23436, 25200, 32640, 39060, 41616, 52326, 61776, 64980, 79800, 97020, 116886, 139656, 145530, 165600, 195000, 228150, 242556, 265356, 304590, 306936, 349866, 353220, 404550, 426426, 461280
Offset: 1

Views

Author

Antonio Roldán, Jan 07 2015

Keywords

Comments

Supersequence of A083374, because A083374(n)= n^2 * (n^2 - 1)/2 = n*(n+1)/2*n*(n-1), product of triangular number n*(n+1)/2 and oblong number n*(n-1).

Examples

			630 is in the sequence because it is a triangular number (630 = 35*36/2) and 630 = 105*6, with 105 = 14*15/2, triangular number, and 6 = 2*3, oblong number.
		

Crossrefs

Programs

  • PARI
    {i=0;j=1;print1(0,", ");while(i<=10^6,k=1;p=2;c=0;while(k0,c=k);if(c>0,print1(i,", "));k+=p;p+=1);i+=j;j+=1)}

A254881 Triangle read by rows, T(n,k) = sum(j=0..k-1, S(n+1,j+1)*S(n,k-j)) where S denotes the Stirling cycle numbers A132393, T(0,0)=1, n>=0, 0<=k<=2n.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 5, 4, 1, 0, 12, 40, 51, 31, 9, 1, 0, 144, 564, 904, 769, 376, 106, 16, 1, 0, 2880, 12576, 23300, 24080, 15345, 6273, 1650, 270, 25, 1, 0, 86400, 408960, 840216, 991276, 748530, 381065, 133848, 32523, 5370, 575, 36, 1, 0, 3628800, 18299520
Offset: 0

Views

Author

Peter Luschny, Feb 10 2015

Keywords

Comments

These are also the coefficients of the polynomials interpolating the sequence k -> n!*((n+k)!/k!)*binomial(n+k-1,k-1) (for fixed n>=0). Divided by n! these polynomials generate the rows of Lah numbers L(n+k, k) = ((n+k)!/k!)* binomial(n+k-1,k-1).

Examples

			[1]
[0, 1, 1]
[0, 2, 5, 4, 1]
[0, 12, 40, 51, 31, 9, 1]
[0, 144, 564, 904, 769, 376, 106, 16, 1]
[0, 2880, 12576, 23300, 24080, 15345, 6273, 1650, 270, 25, 1]
For example in the case n=3 the polynomial (k^6+9*k^5+31*k^4+51*k^3+40*k^2+12*k)/3! generates the Lah numbers 0, 24, 240, 1200, 4200, 11760, 28224, ... (A253285).
		

Crossrefs

The sequences A000012, A002378, A083374, A253285 are the Lah number rows generated by the polynomials divided by n! for n=0, 1, 2, 3 respectivly.

Programs

  • Maple
    # This is a special case of the recurrence given in A246117.
    t := proc(n,k) option remember; if n=0 and k=0 then 1 elif
    k <= 0 or k>n then 0 else iquo(n,2)*t(n-1,k)+t(n-1,k-1) fi end:
    A254881 := (n,k) -> t(2*n,k):
    seq(print(seq(A254881(n,k), k=0..2*n)), n=0..5);
    # Illustrating the comment:
    restart: with(PolynomialTools): with(CurveFitting): for N from 0 to 5 do
    CoefficientList(PolynomialInterpolation([seq([k,N!*((N+k)!/k!)*binomial(N+k-1,k-1)], k=0..2*N)], n), n) od;
  • Mathematica
    Flatten[{1,Table[Table[Sum[Abs[StirlingS1[n+1,j+1]] * Abs[StirlingS1[n,k-j]],{j,0,k-1}],{k,0,2*n}],{n,1,10}]}] (* Vaclav Kotesovec, Feb 10 2015 *)
  • Sage
    def T(n,k):
        if n == 0: return 1
        return sum(stirling_number1(n+1,j+1)*stirling_number1(n,k-j) for j in range(k))
    for n in range (6): [T(n,k) for k in (0..2*n)]

Formula

T(n, n) = A187235(n) for n>=1 (after the explicit formula of Vaclav Kotesovec).

A342719 Array read by ascending antidiagonals: T(k, n) is the sum of the consecutive positive integers from 1 to (n - 1)*k placed along the perimeter of an n-th order perimeter-magic k-gon.

Original entry on oeis.org

21, 36, 45, 55, 78, 78, 78, 120, 136, 120, 105, 171, 210, 210, 171, 136, 231, 300, 325, 300, 231, 171, 300, 406, 465, 465, 406, 300, 210, 378, 528, 630, 666, 630, 528, 378, 253, 465, 666, 820, 903, 903, 820, 666, 465, 300, 561, 820, 1035, 1176, 1225, 1176, 1035, 820, 561
Offset: 3

Views

Author

Stefano Spezia, Mar 19 2021

Keywords

Examples

			The array begins:
k\n|   3    4    5    6    7 ...
---+------------------------
3  |  21   45   78  120  171 ...
4  |  36   78  136  210  300 ...
5  |  55  120  210  325  465 ...
6  |  78  171  300  465  666 ...
7  | 105  231  406  630  903 ...
...
		

Crossrefs

Cf. A014105 (n = 3), A033585 (n = 5), A037270 (1st superdiagonal), A081266 (n = 4), A083374 (1st subdiagonal), A110450 (diagonal), A144312 (n = 6), A144314 (n = 7), A342757, A342758.

Programs

  • Mathematica
    T[k_,n_]:=(n-1)k((n-1)k+1)/2; Table[T[k+3-n,n],{k,3,12},{n,3,k}]//Flatten

Formula

O.g.f.: (x^2 - 3*x^2*y + x*y^2 + 3*x^2*y^2)/((1 - x)^3*(1 - y)^3).
E.g.f.: exp(x+y)*x*(x - x*y + y^2 + x*y^2)/2.
T(k, n) = (n - 1)*k*((n - 1)*k + 1)/2.

A368831 Irregular triangle read by rows: T(n,k) is the number of dominating subsets with cardinality k of the n X n rook graph (n >= 0, 0 <= k <= n^2).

Original entry on oeis.org

1, 0, 1, 0, 0, 6, 4, 1, 0, 0, 0, 48, 117, 126, 84, 36, 9, 1, 0, 0, 0, 0, 488, 2640, 6712, 10864, 12726, 11424, 8008, 4368, 1820, 560, 120, 16, 1, 0, 0, 0, 0, 0, 6130, 58300, 269500, 808325, 1778875, 3075160, 4349400, 5154900, 5186300, 4454400, 3268360, 2042950, 1081575, 480700, 177100, 53130, 12650, 2300, 300, 25, 1
Offset: 0

Views

Author

Stephan Mertens, Jan 07 2024

Keywords

Comments

The entries in row n are the coefficients of the domination polynomial of the n X n rook graph.
Sum of entries in row n = A287065 = main diagonal of A287274.
Number of minimum dominating sets T(n,n) = A248744(n).

Examples

			Triangle begins: (first 5 rows)
  1;
  0, 1;
  0, 0, 6,  4,   1;
  0, 0, 0, 48, 117,  126,   84,    36,     9,     1;
  0, 0, 0,  0, 488, 2640, 6712, 10864, 12726, 11424, 8008, 4368, 1820, 560, 120, 16, 1;
  ...
		

References

  • John J. Watkins, Across the Board: The Mathematics of Chessboard Problems, Princeton University Press, 2004, chapter 7.

Crossrefs

Cf. A000290, A083374, A287065 (row sums), A287274, A248744 (leading diagonal).

Programs

  • Mathematica
    R[n_, m_] := CoefficientList[((x + 1)^n - 1)^m - (-1)^m*Sum[Binomial[m, k]*(-1)^k*((1 + x)^k - 1)^n, {k, 0, m - 1}], x];
    Flatten[Table[R[n,n],{n,1,5}]]

Formula

G.f.: ((x+1)^n - 1)^m - (-1)^m * Sum_{k=0..m-1} binomial(m,k)*(-1)^k*((1+x)^k - 1)^n (for the rectangular n X m rook graph).
T(n,n) = 2*n^n - n!.

A227970 Triangular arithmetic on half-squares: b(n)*(b(n) - 1)/2 where b(n) = floor(n^2/2).

Original entry on oeis.org

0, 0, 1, 6, 28, 66, 153, 276, 496, 780, 1225, 1770, 2556, 3486, 4753, 6216, 8128, 10296, 13041, 16110, 19900, 24090, 29161, 34716, 41328, 48516, 56953, 66066, 76636, 87990, 101025, 114960, 130816, 147696, 166753, 186966, 209628, 233586, 260281, 288420, 319600, 352380, 388521, 426426
Offset: 0

Views

Author

Richard R. Forberg, Aug 01 2013

Keywords

Comments

Analogous to A083374 for the squares A000290.
A "mirrored" repeating pattern of cycle length 20 exists in the last digit.

Crossrefs

Programs

Formula

Let b(n) = floor(n^2/2), for n => 0, then a(n) = b(n)*(b(n)- 1)/2.
G.f.: -x^2*(1+4*x+14*x^2+4*x^3+x^4) / ( (1+x)^3*(x-1)^5 ). - R. J. Mathar, Aug 14 2013
a(n) = binomial(floor(n^2/2), 2). - Wesley Ivan Hurt, Sep 27 2013
Previous Showing 21-30 of 39 results. Next