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.

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.

A317948 An example of a morphic word: the sorted (by length, then alphabetically) sequence of words of the form a*b* under the action of a finite automaton defined as follows: start state is 0; a and b map states [0, 1, 2, 3] to states [1, 2, 3, 0] and [0, 3, 1, 2], respectively.

Original entry on oeis.org

0, 1, 0, 2, 3, 0, 3, 1, 2, 0, 0, 2, 3, 1, 0, 1, 0, 1, 2, 3, 0, 2, 3, 0, 3, 1, 2, 0, 3, 1, 2, 0, 2, 3, 1, 0, 0, 2, 3, 1, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 3, 1, 2, 0, 2, 3, 0, 3, 1, 2, 0, 2, 3, 1, 0, 3, 1, 2, 0, 2, 3, 1, 0, 1, 2, 3, 0, 0, 2, 3, 1, 0, 1, 2, 3, 0
Offset: 1

Views

Author

N. J. A. Sloane, Aug 12 2018

Keywords

Comments

The DuchĂȘne et al. (2011) reference mentions many other sequences that are of great interest.
From Kevin Ryde, Dec 26 2020: (Start)
This sequence can be taken as a square array S(m,k) read by upwards antidiagonals with rows m >= 0 and columns k >= 0. S(m,k) is the final state for input word a^m b^k where ^ denotes repetition. Input a's cycle around states 0,1,2,3 so S(m,0) = m mod 4. Within an array row, input b's are no change at state 0 (so a row of 0's), or a repeating cycle 3,2,1 starting at m mod 4.
Antidiagonal d of the array is input words of length d = m+k, so terms S(d-k,k). These are words a^(d-k) b^k and the combination of d-k mod 4 and k mod 3 is 12-periodic within a diagonal. The sequence can also be taken as a triangle read by rows T(d,k) = S(d-k,k) for d >= 0 and 0 <= k <= d.
Rigo (2000, section 2.1 remark 2) notes that the sequence (flat sequence) is not periodic because pairs of terms 0,0 are at ever-increasing distances apart. They are a(n)=a(n+1)=0 iff n = 2*t*(4*t+1) = A033585(t) for t >= 1, which is every fourth triangular number.
(End)

Examples

			From _Kevin Ryde_, Dec 26 2020: (Start)
Array S(m,k) begins
       k=0  1  2  3  4  5  6  7
      +-------------------------
  m=0 |  0, 0, 0, 0, 0, 0, 0, 0,
  m=1 |  1, 3, 2, 1, 3, 2, 1,
  m=2 |  2, 1, 3, 2, 1, 3,     sequence by upwards
  m=3 |  3, 2, 1, 3, 2,          antidiagonals,
  m=4 |  0, 0, 0, 0,
  m=5 |  1, 3, 2,          12-periodic in diagonals
  m=6 |  2, 1,             (3 or 1-periodic in rows)
  m=7 |  3,                 (4-periodic in columns)
(End)
		

Programs

  • PARI
    S(m,k) = if(m%=4, (m-k-1)%3+1, 0); \\ Kevin Ryde, Dec 26 2020
  • Python
    aut0, aut1 = [1, 2, 3, 0], [0, 3, 1, 2]
    a, row = [0], [0]
    for i in range(1, 10):
        row = [aut0[row[0]]] + [aut1[x] for x in row]
        a += row
    print(a)
    # Andrey Zabolotskiy, Aug 17 2018
    

Formula

From Kevin Ryde, Dec 26 2020: (Start)
S(m,k) = 0 if m==0 (mod 4), otherwise S(m,k) = (((m mod 4) - k - 1) mod 3) + 1.
T(d,k) = S(d-k,k) = p(3*d+k mod 12) where p(0..11) = 0,2,3,1, 0,1,2,3, 0,3,1,2.
(End)

Extensions

New name and terms a(51) and beyond from Andrey Zabolotskiy, Aug 17 2018

A361258 Irregular triangle read by rows in which row n lists the print order of a 4n-page booklet.

Original entry on oeis.org

2, 3, 4, 1, 2, 7, 8, 1, 4, 5, 6, 3, 2, 11, 12, 1, 4, 9, 10, 3, 6, 7, 8, 5, 2, 15, 16, 1, 4, 13, 14, 3, 6, 11, 12, 5, 8, 9, 10, 7, 2, 19, 20, 1, 4, 17, 18, 3, 6, 15, 16, 5, 8, 13, 14, 7, 10, 11, 12, 9, 2, 23, 24, 1, 4, 21, 22, 3, 6, 19, 20, 5, 8, 17, 18, 7, 10, 15, 16, 9, 12, 13, 14, 11
Offset: 1

Views

Author

Ole Palnatoke Andersen, Mar 06 2023

Keywords

Comments

Row n is a permutation of the first 4*n positive integers.

Examples

			Triangle begins:
  2,  3,  4, 1;
  2,  7,  8, 1, 4,  5,  6, 3;
  2, 11, 12, 1, 4,  9, 10, 3, 6,  7,  8, 5;
  2, 15, 16, 1, 4, 13, 14, 3, 6, 11, 12, 5, 8, 9, 10, 7;
  ...
		

Crossrefs

Cf. A008586 (row lengths), A033585 (row sums).

Programs

  • Maple
    T:= n-> seq([2*m, 4*n-2*m+1, 4*n-2*m+2, 2*m-1][], m=1..n):
    seq(T(n), n=1..6);  # Alois P. Heinz, Mar 06 2023

A343155 Irregular triangle T read by rows: T(n, k) is the sum of the consecutive integers placed along the k-th turn of the spiral of the n X n matrix defined in A126224.

Original entry on oeis.org

1, 10, 36, 9, 78, 58, 136, 164, 25, 210, 318, 138, 300, 520, 356, 49, 406, 770, 654, 250, 528, 1068, 1032, 612, 81, 666, 1414, 1490, 1086, 394, 820, 1808, 2028, 1672, 932, 121, 990, 2250, 2646, 2370, 1614, 570, 1176, 2740, 3344, 3180, 2440, 1316, 169, 1378, 3278, 4122, 4102, 3410, 2238, 778
Offset: 1

Views

Author

Stefano Spezia, Apr 07 2021

Keywords

Examples

			The triangle T(n, k) begins:
n\k|   1    2    3    4
---+-------------------
1  |   1
2  |  10
3  |  36    9
4  |  78   58
5  | 136  164   25
6  | 210  318  138
7  | 300  520  356   49
...
For n = 1 the matrix is
      1
and T(1, 1) = 1.
For n = 2 the matrix is
      1, 2
      4, 3
and T(2, 1) = 1 + 2 + 3 + 4 = 4*5/2 = 10.
For n = 3 the matrix is
      1, 2, 3
      8, 9, 4
      7, 6, 5
and T(3, 1) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 8*9/2 = 36; T(3, 2) = 9.
For n = 4 the matrix is
      1,  2,  3,  4
     12, 13, 14,  5
     11, 16, 15,  6
     10,  9,  8,  7
and T(4, 1) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 = 12*13/2 = 78; T(4, 2) = 13 + 14 + 15 + 16 = (13 + 16)*4/2 = 58.
...
		

Crossrefs

Programs

  • Mathematica
    Table[2(2k-n-1)(3+8k(k-n-1)+4n)+n^2KroneckerDelta[n,2k-1],{n,14},{k,Ceiling[n/2]}]//Flatten

Formula

T(n, k) = 2*(2*k - n - 1)*(3 + 8*k*(k - n - 1) + 4*n) + n^2*0^(n+1-2*k) with 0 < k <= ceiling(n/2).
T(n, 1) = A033585(n-1) for n > 1.
Previous Showing 21-24 of 24 results.