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.

A213500 Rectangular array T(n,k): (row n) = b**c, where b(h) = h, c(h) = h + n - 1, n >= 1, h >= 1, and ** = convolution.

Original entry on oeis.org

1, 4, 2, 10, 7, 3, 20, 16, 10, 4, 35, 30, 22, 13, 5, 56, 50, 40, 28, 16, 6, 84, 77, 65, 50, 34, 19, 7, 120, 112, 98, 80, 60, 40, 22, 8, 165, 156, 140, 119, 95, 70, 46, 25, 9, 220, 210, 192, 168, 140, 110, 80, 52, 28, 10, 286, 275, 255, 228, 196, 161, 125, 90
Offset: 1

Views

Author

Clark Kimberling, Jun 14 2012

Keywords

Comments

Principal diagonal: A002412.
Antidiagonal sums: A002415.
Row 1: (1,2,3,...)**(1,2,3,...) = A000292.
Row 2: (1,2,3,...)**(2,3,4,...) = A005581.
Row 3: (1,2,3,...)**(3,4,5,...) = A006503.
Row 4: (1,2,3,...)**(4,5,6,...) = A060488.
Row 5: (1,2,3,...)**(5,6,7,...) = A096941.
Row 6: (1,2,3,...)**(6,7,8,...) = A096957.
...
In general, the convolution of two infinite sequences is defined from the convolution of two n-tuples: let X(n) = (x(1),...,x(n)) and Y(n)=(y(1),...,y(n)); then X(n)**Y(n) = x(1)*y(n)+x(2)*y(n-1)+...+x(n)*y(1); this sum is the n-th term in the convolution of infinite sequences:(x(1),...,x(n),...)**(y(1),...,y(n),...), for all n>=1.
...
In the following guide to related arrays and sequences, row n of each array T(n,k) is the convolution b**c of the sequences b(h) and c(h+n-1). The principal diagonal is given by T(n,n) and the n-th antidiagonal sum by S(n). In some cases, T(n,n) or S(n) differs in offset from the listed sequence.
b(h)........ c(h)........ T(n,k) .. T(n,n) .. S(n)
h .......... h .......... A213500 . A002412 . A002415
h .......... h^2 ........ A212891 . A213436 . A024166
h^2 ........ h .......... A213503 . A117066 . A033455
h^2 ........ h^2 ........ A213505 . A213546 . A213547
h .......... h*(h+1)/2 .. A213548 . A213549 . A051836
h*(h+1)/2 .. h .......... A213550 . A002418 . A005585
h*(h+1)/2 .. h*(h+1)/2 .. A213551 . A213552 . A051923
h .......... h^3 ........ A213553 . A213554 . A101089
h^3 ........ h .......... A213555 . A213556 . A213547
h^3 ........ h^3 ........ A213558 . A213559 . A213560
h^2 ........ h*(h+1)/2 .. A213561 . A213562 . A213563
h*(h+1)/2 .. h^2 ........ A213564 . A213565 . A101094
2^(h-1) .... h .......... A213568 . A213569 . A047520
2^(h-1) .... h^2 ........ A213573 . A213574 . A213575
h .......... Fibo(h) .... A213576 . A213577 . A213578
Fibo(h) .... h .......... A213579 . A213580 . A053808
Fibo(h) .... Fibo(h) .... A067418 . A027991 . A067988
Fibo(h+1) .. h .......... A213584 . A213585 . A213586
Fibo(n+1) .. Fibo(h+1) .. A213587 . A213588 . A213589
h^2 ........ Fibo(h) .... A213590 . A213504 . A213557
Fibo(h) .... h^2 ........ A213566 . A213567 . A213570
h .......... -1+2^h ..... A213571 . A213572 . A213581
-1+2^h ..... h .......... A213582 . A213583 . A156928
-1+2^h ..... -1+2^h ..... A213747 . A213748 . A213749
h .......... 2*h-1 ...... A213750 . A007585 . A002417
2*h-1 ...... h .......... A213751 . A051662 . A006325
2*h-1 ...... 2*h-1 ...... A213752 . A100157 . A071238
2*h-1 ...... -1+2^h ..... A213753 . A213754 . A213755
-1+2^h ..... 2*h-1 ...... A213756 . A213757 . A213758
2^(n-1) .... 2*h-1 ...... A213762 . A213763 . A213764
2*h-1 ...... Fibo(h) .... A213765 . A213766 . A213767
Fibo(h) .... 2*h-1 ...... A213768 . A213769 . A213770
Fibo(h+1) .. 2*h-1 ...... A213774 . A213775 . A213776
Fibo(h) .... Fibo(h+1) .. A213777 . A001870 . A152881
h .......... 1+[h/2] .... A213778 . A213779 . A213780
1+[h/2] .... h .......... A213781 . A213782 . A005712
1+[h/2] .... [(h+1)/2] .. A213783 . A213759 . A213760
h .......... 3*h-2 ...... A213761 . A172073 . A002419
3*h-2 ...... h .......... A213771 . A213772 . A132117
3*h-2 ...... 3*h-2 ...... A213773 . A214092 . A213818
h .......... 3*h-1 ...... A213819 . A213820 . A153978
3*h-1 ...... h .......... A213821 . A033431 . A176060
3*h-1 ...... 3*h-1 ...... A213822 . A213823 . A213824
3*h-1 ...... 3*h-2 ...... A213825 . A213826 . A213827
3*h-2 ...... 3*h-1 ...... A213828 . A213829 . A213830
2*h-1 ...... 3*h-2 ...... A213831 . A213832 . A212560
3*h-2 ...... 2*h-1 ...... A213833 . A130748 . A213834
h .......... 4*h-3 ...... A213835 . A172078 . A051797
4*h-3 ...... h .......... A213836 . A213837 . A071238
4*h-3 ...... 2*h-1 ...... A213838 . A213839 . A213840
2*h-1 ...... 4*h-3 ...... A213841 . A213842 . A213843
2*h-1 ...... 4*h-1 ...... A213844 . A213845 . A213846
4*h-1 ...... 2*h-1 ...... A213847 . A213848 . A180324
[(h+1)/2] .. [(h+1)/2] .. A213849 . A049778 . A213850
h .......... C(2*h-2,h-1) A213853
...
Suppose that u = (u(n)) and v = (v(n)) are sequences having generating functions U(x) and V(x), respectively. Then the convolution u**v has generating function U(x)*V(x). Accordingly, if u and v are homogeneous linear recurrence sequences, then every row of the convolution array T satisfies the same homogeneous linear recurrence equation, which can be easily obtained from the denominator of U(x)*V(x). Also, every column of T has the same homogeneous linear recurrence as v.

Examples

			Northwest corner (the array is read by southwest falling antidiagonals):
  1,  4, 10, 20,  35,  56,  84, ...
  2,  7, 16, 30,  50,  77, 112, ...
  3, 10, 22, 40,  65,  98, 140, ...
  4, 13, 28, 50,  80, 119, 168, ...
  5, 16, 34, 60,  95, 140, 196, ...
  6, 19, 40, 70, 110, 161, 224, ...
T(6,1) = (1)**(6) = 6;
T(6,2) = (1,2)**(6,7) = 1*7+2*6 = 19;
T(6,3) = (1,2,3)**(6,7,8) = 1*8+2*7+3*6 = 40.
		

Crossrefs

Cf. A000027.

Programs

  • Mathematica
    b[n_] := n; c[n_] := n
    t[n_, k_] := Sum[b[k - i] c[n + i], {i, 0, k - 1}]
    TableForm[Table[t[n, k], {n, 1, 10}, {k, 1, 10}]]
    Flatten[Table[t[n - k + 1, k], {n, 12}, {k, n, 1, -1}]]
    r[n_] := Table[t[n, k], {k, 1, 60}]  (* A213500 *)
  • PARI
    t(n,k) = sum(i=0, k - 1, (k - i) * (n + i));
    tabl(nn) = {for(n=1, nn, for(k=1, n, print1(t(k,n - k + 1),", ");); print(););};
    tabl(12) \\ Indranil Ghosh, Mar 26 2017
    
  • Python
    def t(n, k): return sum((k - i) * (n + i) for i in range(k))
    for n in range(1, 13):
        print([t(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 26 2017

Formula

T(n,k) = 4*T(n,k-1) - 6*T(n,k-2) + 4*T(n,k-3) - T(n,k-4).
T(n,k) = 2*T(n-1,k) - T(n-2,k).
G.f. for row n: x*(n - (n - 1)*x)/(1 - x)^4.

A092867 Number of regions in an equilateral triangular figure formed by the straight line segments connecting all vertices and all points that divide the sides into n equal parts.

Original entry on oeis.org

1, 12, 75, 252, 715, 1572, 3109, 5676, 9291, 14556, 22081, 32502, 44935, 62868, 83286, 108384, 140152, 181710, 225565, 282978, 342792, 415614, 502318, 606642, 708505, 839874, 983007, 1141416, 1315102, 1529526, 1733476, 1994550, 2259420, 2559990, 2878053, 3237414, 3593521, 4047906, 4510590, 5002350, 5506918, 6128100, 6704800, 7414518, 8113992, 8858622, 9682927, 10626774, 11478142, 12519492
Offset: 1

Views

Author

Hugo Pfoertner, Mar 15 2004

Keywords

Examples

			a(2)=12 because the 6 line segments mutually connecting the vertices and the mid-side nodes form 12 congruent right triangles of two different sizes.
a(3)=75: 48 triangles, 24 quadrilaterals and 3 pentagons are formed. See pictures at Pfoertner link.
		

Crossrefs

Cf. A092866 (number of intersections), A274585 (number of points both inside and on the triangle sides), A274586 (number of edges), A331911 (number of n-gons).
Cf. A092098 (regions in triangle cut by line segments connecting vertices with subdivision points on opposite side), A006533 (regions formed by all diagonals in regular n-gon), A002717 (triangles in triangular matchstick arrangement).
If the boundary points are in general position, we get A367117, A213827, A367118, A367119. - N. J. A. Sloane, Nov 09 2023

Formula

By the Euler characteristic, a(n) = A274586(n) - A274585(n) + 1 = A274586(n) - A092866(n) - 3n - 1.

Extensions

a(1)=1 prepended by Max Alekseyev, Jun 29 2016
a(6)-a(50) from Cynthia Miaina Rasamimanananivo, Jun 28 2016, Jul 01 2016, Aug 05 2016, Aug 15 2016
Definition edited by N. J. A. Sloane, May 13 2020

A274586 Number of edges formed by sides and straight "chords" in a right triangle when each side is divided by vertices into n equal segments.

Original entry on oeis.org

3, 21, 132, 429, 1272, 2826, 5640, 10461, 17094, 26847, 41046, 61041, 84051, 118974, 157209, 204393, 264855, 346524, 428880, 541683, 654087, 793611, 961179, 1167468, 1357515, 1615209, 1891980, 2198019, 2530275, 2957808, 3341439, 3860652, 4371006, 4959636, 5572167, 6277722, 6950064, 7859406, 8763780, 9722571, 10687506, 11934912, 13029834, 14450598, 15805026, 17250795, 18863397, 20763204, 22372839, 24450474
Offset: 1

Views

Author

Cynthia Miaina Rasamimanananivo and Max Alekseyev, Jun 29 2016, Sep 02 2016

Keywords

Crossrefs

If the boundary points are in general position, we get A367117, A213827, A367118, A367119. - N. J. A. Sloane, Nov 09 2023

Formula

By the Euler characteristic, a(n) = A274585(n) + A092867(n) - 1 = A092866(n) + A092867(n) + 3n - 1.

A092866 Number of intersections inside an equilateral triangular figure formed by the straight line segments mutually connecting all vertices and all points that divide the sides into n equal parts. If three or more lines meet at an interior point this intersection is counted only once.

Original entry on oeis.org

0, 4, 49, 166, 543, 1237, 2511, 4762, 7777, 12262, 18933, 28504, 39078, 56065, 73879, 95962, 124653, 164761, 203259, 258646, 311233, 377932, 458793, 560755, 648936, 775258, 908893, 1056520, 1215087, 1428193, 1607871, 1866007, 2111488, 2399545, 2694010, 3040201, 3356433, 3811387, 4253074, 4720102, 5180466, 5806687, 6324906, 7035949, 7690900, 8392036, 9180330, 10136287, 10894551, 11930833
Offset: 1

Views

Author

Hugo Pfoertner, Mar 10 2004

Keywords

Comments

A detailed example for n=5 is given at the Pfoertner link.

Examples

			a(2)=4 because there are 3 intersection points between the triangle medians and the line segments connecting the midpoints of the sides plus the intersection of the 3 medians at the centroid.
		

Crossrefs

Cf. A092867 (regions formed by the diagonals), A274585 (points both inside and on the triangle sides), A274586 (edges).
Cf. A006561 (number of intersections of diagonals of regular n-gon), A091908 (intersections between line segments connecting vertices with subdivision points on opposite side).
If the boundary points are in general position, we get A367117, A213827, A367118, A367119. - N. J. A. Sloane, Nov 09 2023

Programs

  • Maple
    Inter:= proc(p1x,p1y,p2x,p2y,q1x,q1y,q2x,q2y)
      local det,x,y;
      det:= p1x*q1y-p1x*q2y-p1y*q1x+p1y*q2x-p2x*q1y+p2x*q2y+p2y*q1x-p2y*q2x;
      if det = 0 then return NULL fi;
      x:= (p1x*p2y*q1x-p1x*p2y*q2x-p1x*q1x*q2y+p1x*q1y*q2x-p1y*p2x*q1x+p1y*p2x*q2x+p2x*q1x*q2y-p2x*q1y*q2x)/det;
      y:= (p1x*p2y*q1y-p1x*p2y*q2y-p1y*p2x*q1y+p1y*p2x*q2y-p1y*q1x*q2y+p1y*q1y*q2x+p2y*q1x*q2y-p2y*q1y*q2x)/det;
      if x >0 and y > 0 and x + y < 1 then [x,y]
      else NULL
      fi
    end proc:
    F:= proc(n) local A,B,C,Pairs,Pts;
         A:= [seq([j/n,0],j=0..n)];
         B:= [seq([0,j/n],j=0..n)];
         C:= [seq([j/n,1-j/n],j=0..n)];
         Pairs:= [seq(seq([A[i],B[j]],i=2..n+1),j=2..n+1),
                  seq(seq([A[i],C[j]],i=1..n),j=1..n),
                  seq(seq([B[i],C[j]],i=1..n),j=2..n+1)];
         Pts:= {seq(seq(Inter(op(Pairs[i][1]),op(Pairs[i][2]),op(Pairs[j][1]),op(Pairs[j][2])),j=1..i-1),i=2..nops(Pairs))};
         nops(Pts);
    end proc:
    map(F, [$1..20]); # Robert Israel, Jun 30 2016
  • Mathematica
    Inter[{p1x_, p1y_}, {p2x_, p2y_}, {q1x_, q1y_}, {q2x_, q2y_}] := Module[ {det, x, y}, det = p1x q1y - p1x q2y - p1y q1x + p1y q2x - p2x q1y + p2x q2y + p2y q1x - p2y q2x; If[det == 0, Return[Nothing]]; x = (p1x p2y q1x - p1x p2y q2x - p1x q1x q2y + p1x q1y q2x - p1y p2x q1x + p1y p2x q2x + p2x q1x q2y - p2x q1y q2x)/det; y = (p1x p2y q1y - p1x p2y q2y - p1y p2x q1y + p1y p2x q2y - p1y q1x q2y + p1y q1y q2x + p2y q1x q2y - p2y q1y q2x)/det; If[x > 0 && y > 0 && x + y < 1, {x, y}, Nothing]];
    F[n_] := F[n] = Module[{A, B, K, Pairs, Pts}, A = Table[{j/n, 0}, {j, 0, n}]; B = Table[{0, j/n}, {j, 0, n}]; K = Table[{j/n, 1 - j/n}, {j, 0, n}]; Pairs = {Table[Table[{A[[i]], B[[j]]}, {i, 2, n+1}], {j, 2, n+1}], Table[Table[{A[[i]], K[[j]]}, {i, 1, n}], {j, 1, n}], Table[Table[ {B[[i]], K[[j]]}, {i, 1, n}], {j, 2, n+1}]} // Flatten[#, 2]&; Pts = Table[Table[Inter[Pairs[[i, 1]], Pairs[[i, 2]], Pairs[[j, 1]], Pairs[[j, 2]]], {j, 1, i-1}], {i, 2, Length[Pairs]}]; Flatten[Pts, 1] // Union // Length];
    Table[Print[n, " ", F[n]]; F[n], {n, 1, 20}] (* Jean-François Alcover, Apr 11 2019, after Robert Israel *)

Formula

a(n) = A274585(n) - 3n.

Extensions

a(1) = 0 prepended by Max Alekseyev, Jun 29 2016
a(4) corrected and a(6)-a(20) added by Cynthia Miaina Rasamimanananivo, Jun 28 2016
a(20) corrected by Robert Israel, Jun 30 2016
a(21)-a(50) from Cynthia Miaina Rasamimanananivo, Jun 30 - Aug 23, 2016
"Equilateral" added to definition by N. J. A. Sloane, May 13 2020

A213825 Rectangular array: (row n) = b**c, where b(h) = 3*h-1, c(h) = 3*n-5+3*h, n>=1, h>=1, and ** = convolution.

Original entry on oeis.org

2, 13, 8, 42, 34, 14, 98, 87, 55, 20, 190, 176, 132, 76, 26, 327, 310, 254, 177, 97, 32, 518, 498, 430, 332, 222, 118, 38, 772, 749, 669, 550, 410, 267, 139, 44, 1098, 1072, 980, 840, 670, 488, 312, 160, 50, 1505, 1476, 1372
Offset: 1

Views

Author

Clark Kimberling, Jul 04 2012

Keywords

Comments

Principal diagonal: A213826
Antidiagonal sums: A213827
Row 1, (2,5,8,13,...)**(1,4,7,10,13,...): (3*k^2 + k)/2
Row 2, (2,5,8,13,...)**(4,7,10,13,...): (3*k^3 + 9*k^2 - 2*k)/2
Row 3, (2,5,8,13,...)**(7,10,13,16,...): (3*k^3 + 18*k^2 - 5*k)/2
For a guide to related arrays, see A212500.

Examples

			Northwest corner (the array is read by falling antidiagonals):
2....13....42....98....190
8....34....87....176...310
14...55....132...254...430
20...76....177...332...550
26...97....222...410...670
32...118...267...488...790
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=3n-1;c[n_]:=3n-2;
    t[n_,k_]:=Sum[b[k-i]c[n+i],{i,0,k-1}]
    TableForm[Table[t[n,k],{n,1,10},{k,1,10}]]
    Flatten[Table[t[n-k+1,k],{n,12},{k,n,1,-1}]]
    r[n_]:=Table[t[n,k],{k,1,60}] (* A213825 *)
    d=Table[t[n,n],{n,1,40}] (* A213826 *)
    d/2 (* A024215 *)
    s[n_]:=Sum[t[i,n+1-i],{i,1,n}]
    s1=Table[s[n],{n,1,50}] (* A213827 *)

Formula

T(n,k) = 4*T(n,k-1)-6*T(n,k-2)+4*T(n,k-3)-T(n,k-4).
G.f. for row n: f(x)/g(x), where f(x) = x*((3*n-1) + (3*n+2)*x - (6*n-8)*x^2) and g(x) = (1-x)^4.
Showing 1-5 of 5 results.