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

A265282 Number of triangles in a certain geometric structure: see "Illustration of initial terms" link for precise definition.

Original entry on oeis.org

0, 1, 3, 5, 10, 13, 22, 26, 41, 46, 68, 74, 105, 112, 153, 161, 214, 223, 289, 299, 380, 391, 488, 500, 615, 628, 762, 776, 931, 946, 1123, 1139, 1340, 1357, 1583, 1601, 1854, 1873, 2154, 2174, 2485, 2506, 2848, 2870, 3245, 3268, 3677, 3701, 4146, 4171, 4653
Offset: 0

Views

Author

Luce ETIENNE, Dec 06 2015

Keywords

Comments

In words: This sequence gives the number of triangles of all sizes in a (2*n^2+8*n-1+(-1)^n)/8-polyiamond with a (7*n-2-(n-2)*(-1)^n)/4-gon: we have (2*n^3+9*n^2+31*n+21+3*(n^2-5*n-7)*(-1)^n)/96 triangles in a direction and (2*n^3+27*n^2+109*n-66+3*(n^2+9*n+18)*(-1)^n+12*(-1)^((2*n-1+(-1)^n)/4))/192 triangles in the other direction. (But the Illustration link is far more informative. - N. J. A. Sloane, Jan 23 2016)
At stage n, we count (2*n^2 + 6*n + 3 - (2*n+3)*(-1)^n)/16 triangles of size 1 in one direction and (2*n^2 + 10*n - 5 + (2*n+5)*(-1)^n)/16 triangles of size 1 in the opposite direction. The total number of triangles of size 1 in both directions is A024206(n+1).
We observe that a(4)=10 strengthens the Pythagorean relation between 4 and 10 (Tetraktys): cf. triangular numbers, A000217; and that it is from n = 4 we can see and count hexagonal and dodecagonal forms, for example, in a reticular system (incomplete with hexagonal holes) by opposition to the compact shape obtained from A002717.
We can obtain this reticular system from A248851.

Crossrefs

Programs

  • Magma
    [(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n) div 4)) / 64: n in [0..50]]; // Vincenzo Librandi, Dec 07 2015
    
  • Mathematica
    Table[(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n +
        4*(-1)^((2*n - 1 + (-1)^n)/4))/64, {n, 0, 100}] (* G. C. Greubel, Dec 20 2015 *)
    LinearRecurrence[{1,2,-2,0,0,-2,2,1,-1},{0,1,3,5,10,13,22,26,41},60] (* Harvey P. Dale, Aug 07 2019 *)
  • PARI
    vector(100, n, n--; (2*n^3+15*n^2+57*n-8+(3*n^2-n+4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64) \\ Altug Alkan, Dec 06 2015
    
  • PARI
    concat(0, Vec(x*(1+2*x+x^3-x^4-x^5+x^7)/((1-x)^4*(1+x)^3*(1+x^2)) + O(x^100))) \\ Colin Barker, Dec 07 2015

Formula

a(n) = A045947(floor(n/2)) + A024206(n+1). Note that A045947(floor(n/2)) = (2*n^3-n^2-7*n+(3*n^2-n-4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64.
a(n) = (2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n)/4))/64.
G.f.: x*(1+2*x+x^3-x^4-x^5+x^7) / ((1-x)^4*(1+x)^3*(1+x^2)). - Colin Barker, Dec 07 2015

Extensions

a(26) corrected by Altug Alkan, Dec 06 2015

A332410 a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7) with a(0)=0, a(1)=1, a(2)=3, a(3)=6, a(4)=11, a(5)=17, a(6)=24.

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 24, 32, 41, 52, 64, 77, 91, 106, 123, 141, 160, 180, 201, 224, 248, 273, 299, 326, 355, 385, 416, 448, 481, 516, 552, 589, 627, 666, 707, 749, 792, 836, 881, 928, 976, 1025, 1075, 1126, 1179
Offset: 0

Views

Author

Paul Curtz, Feb 11 2020

Keywords

Comments

This sequence occurs twice as a linear spoke in the hexagonal spiral constructed from A002266:
17 17 17 17 17 18 18
16 11 11 11 11 12 12 18
16 11 6 6 7 7 7 12 18
16 10 6 3 3 3 3 7 12 18
16 10 6 3 1 1 1 4 7 12 19
16 10 6 2 0 0 0 1 4 8 13 19
15 10 5 2 0 0 1 4 8 13 19
15 10 5 2 2 2 4 8 13 19
15 9 5 5 5 4 8 13 19
15 9 9 9 9 8 13 20
15 14 14 14 14 14 20
a(-1-n) = 0, 1, 4, 8, 13, 19, 26, 35, 45, ... also occurs twice in the same spiral.
Difference table:
0, 1, 3, 6, 11, 17, 24, 32, 41, 52, ... = a(n)
1, 2, 3, 5, 6, 7, 8, 9, 11, 12, ... = A047256(n+1)
1, 1, 2, 1, 1, 1, 1, 2, 1, 1, ... = A130782.
There is no linear spoke with three copies in this spiral. Compare with the spiral illustrated in sequence A330707 and constructed from A002265 where the same spokes occur three times: A006578, A001859 and A077043, essentially. Strictly, three times from 1, 1, 1 for A006578, from 2, 2, 2 for A001859 and from 7, 7, 7 for A077043.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {0, 1, 3, 6, 11, 17, 24}, 45] (* Amiram Eldar, Feb 12 2020 *)
  • PARI
    concat(0, Vec(x*(1 + x)*(1 + x^2 + x^3) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)) + O(x^50))) \\ Colin Barker, Feb 11 2020, Apr 24 2020

Formula

a(8+n) - a(8-n) = 20*n.
G.f.: x*(1 + x)*(1 + x^2 + x^3) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)). - Colin Barker, Feb 11 2020

A372477 Areas of alternating equilateral and non-equilateral triangles that make up a three-leaf tiling over a regular triangular grid.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 16, 17, 19, 20, 21, 24, 25, 26, 27, 28, 30, 31, 33, 34, 36, 37, 39, 42, 43, 44, 46, 48, 49, 50, 52, 56, 57, 60, 61, 63, 64, 65, 67, 70, 72, 73, 75, 76, 79, 81, 82, 84, 85, 86, 89, 90, 91, 93, 94, 97, 100
Offset: 1

Views

Author

Yury Kazakov, S. P. Obukhov, Sean Sun, and N. A. Shikhova, May 02 2024

Keywords

Comments

The plane is divided into three equal 120-degree slices, and the illustration depicts a single slice. Along the boundaries of the slice, we build equilateral triangles beginning from the center with areas of 1,4,9,16,25 and so on. Then we build a segment connecting the free neighboring vertices of the initial triangles; this segment becomes the base of a new equilateral triangle, etc. In the Picture 1 and Picture 2 presented in the links below, blue triangles are equilateral, white triangles are not equilateral. In accordance with Pick's theorem for triangle grids, all triangles have integer areas.
It is convenient to represent the sequence as a sequence of values of the areas of triangles located inside the slice of the plane. The first layer contains two triangles with areas (1,1) and is located in the center of the slice, the second layer contains triangles with areas (4,2,3,2,4), the third contains triangles with areas (9,6,7,5,7,6,9) and so on (Picture 1). Layer number n contains 2n+1 triangles (except for the first layer, which has 2 triangles). The sequence represents the values of the areas of these triangles collected into one set, with duplicate elements removed, sorted in increasing order.

Examples

			For L=4:
Number Layer n = 1, Min Layer 1, [1, 1]
Number Layer n = 2, Min Layer 2, [4, 2, 3, 2, 4]
Number Layer n = 3, Min Layer 5, [9, 6, 7, 5, 7, 6, 9]
Number Layer n = 4, Min Layer 10, [16, 12, 13, 10, 12, 10, 13, 12, 16]
Number Layer n = 5, Min Layer 16, [25, 20, 21, 17, 19, 16, 19, 17, 21, 20, 25]
Number of terms below L^2+1=17 is 12.
In increasing order, without duplicates: [1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 16].
Terms below 17 are a(1)=1, a(2)=2, ..., a(11)=13, a(12)=16.
.
===============================
=== Alternative layout idea ===
===============================
.
The table below lists the numbers in layer n for n = 1..5. For each layer n >= 2, the table shows a pair of rows; the upper and lower rows in each pair list the triangle areas computed using the above formulas for b(n,k) and c(n,k), respectively.
                                                              min.
  --+-----+-------+-------+-------+-------+-------+-------+  number
  n | b/c | k = 0 |   1   |   2   |   3   |   4   |   5   | in layer
  ==+=====+=======+=======+=======+=======+=======+=======+==========
  1 |  -  |  1  1 |       |       |       |       |       |     1
  --+-----+-------+-------+-------+-------+-------+-------+----------
  2 |  c  |     2 |     2 |       |       |       |       |     2
    |  b  |  4    |  3    |  4    |       |       |       |
  --+-----+-------+-------+-------+-------+-------+-------+----------
  3 |  c  |     6 |     5 |     6 |       |       |       |     5
    |  b  |  9    |  7    |  7    |  9    |       |       |
  --+-----+-------+-------+-------+-------+-------+-------+----------
  4 |  c  |    12 |    10 |    10 |    12 |       |       |    10
    |  b  | 16    | 13    | 12    | 13    | 16    |       |
  --+-----+-------+-------+-------+-------+-------+-------+----------
  5 |  c  |    20 |    17 |    16 |    17 |    20 |       |    16
    |  b  | 25    | 21    | 19    | 19    | 21    | 25    |
  --+-----+-------+-------+-------+-------+-------+-------+----------
		

Crossrefs

Cf. A372498 (complement).
Cf. A003136, A001859 (min terms of layers).

Programs

  • Python
    import math
    L=10 #generates terms below L**2+1
    Lmax=math.trunc((1+2*math.sqrt(3*L**2+1))/3)+1
    tr=set()
    tr.add(1)
    for n in range(2,Lmax):
      for k in range(0,n):
        p1=n*n+k*k-k*n
        p2=p1+k-n
        if p1<=L**2:
          tr.add(p1)
        if p2<=L**2:
          tr.add(p2)
    print('Number terms below', L**2+1, 'is', len(tr))
    print(sorted(tr))

Formula

Terms in {a(n)} <= L^2 are computed as follows:
Let Lmax = floor((2*sqrt(3*L^2+1)+1)/3)+1;
for n=1..Lmax, compute the terms in layer n, which are
[b(n,0), c(n,0), b(n,1), c(n,1), ..., b(n,n-1), c(n,n-1), b(n,n)],
using the formulas
b(n,k) = n*n + k*k - k*n for k = 0..n
and
c(n,k) = n*n + k*k - k*n + k - n for k = 0..n-1;
sort terms b(n,k) <= L^2 and c(n,k) <= L^2 in increasing order, and remove duplicates.

A191318 Triangle read by rows: T(n,k) is the number of dispersed Dyck paths of length n (i.e., Motzkin paths of length n with no (1,0) steps at positive heights) having pyramid weight equal to k.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 4, 5, 1, 5, 10, 4, 1, 6, 16, 12, 1, 7, 24, 30, 8, 1, 8, 33, 56, 28, 1, 9, 44, 98, 84, 16, 1, 10, 56, 152, 179, 64, 1, 11, 70, 228, 358, 224, 32, 1, 12, 85, 320, 618, 536, 144, 1, 13, 102, 440, 1030, 1206, 576, 64, 1, 14, 120, 580, 1580, 2292, 1528, 320, 1, 15, 140, 754, 2370, 4202, 3820, 1440, 128
Offset: 0

Views

Author

Emeric Deutsch, Jun 01 2011

Keywords

Comments

A pyramid in a dispersed Dyck path is a factor of the form U^h D^h, h being the height of the pyramid and U=(1,1), D=(1,-1). A pyramid in a dispersed Dyck path w is maximal if, as a factor in w, it is not immediately preceded by a U and immediately followed by a D. The pyramid weight of a dispersed Dyck path is the sum of the heights of its maximal pyramids.
Row n has 1 + floor(n/2) entries.
Sum of entries in row n is binomial(n, floor(n/2)) = A001405(n).

Examples

			T(6,2)=10 because we have HH(UD)(UD), HH(UUDD), H(UD)H(UD), H(UD)(UD)H, H(UUDD)H, (UD)HH(UD), (UD)H(UD)H, (UD)(UD)HH, (UUDD)HH, and U(UD)(UD)D, where U=(1,1), D=(1,-1), H=(1,0); the maximal pyramids are shown between parentheses.
Triangle starts:
  1;
  1;
  1,  1;
  1,  2;
  1,  3,  2;
  1,  4,  5;
  1,  5, 10,  4;
  1,  6, 16, 12;
  1,  7, 24, 30,  8;
		

Crossrefs

Programs

  • Maple
    a := (z-1)*(2*t*z^2+z-1): c := -1+t*z^2: eq := a*z*G^2+a*G+c: f := RootOf(eq, G): fser := simplify(series(f, z = 0, 20)): for n from 0 to 16 do P[n] := sort(expand(coeff(fser, z, n))) end do: for n from 0 to 16 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form

Formula

T(n,0) = 1;
T(n,1) = n-1 (n>=1).
T(n,2) = A001859(n-3) (n>=4).
Sum_{k>=0} k*T(n,k) = A191319(n).
G.f.: G=G(t,z) satisfies z*(1-z)*(z-1+2*t*z^2)*G^2 + (1-z)*(z-1+2*t*z^2)*G+1-t*z^2=0.
Previous Showing 21-24 of 24 results.