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.

A377137 Array read by rows (blocks). Each row is a permutation of a block of consecutive numbers; the blocks are disjoint and every positive number belongs to some block. Row n contains 3n/2 elements if n is even, and (n+1)/2 elements if n is odd; ; see Comments.

Original entry on oeis.org

1, 4, 2, 3, 6, 5, 12, 10, 8, 7, 9, 11, 15, 13, 14, 24, 22, 20, 18, 16, 17, 19, 21, 23, 28, 26, 25, 27, 40, 38, 36, 34, 32, 30, 29, 31, 33, 35, 37, 39, 45, 43, 41, 42, 44, 60, 58, 56, 54, 52, 50, 48, 46, 47, 49, 51, 53, 55, 57, 59, 66, 64, 62, 61, 63, 65, 84, 82, 80, 78, 76, 74, 72, 70, 68, 67, 69, 71, 73, 75, 77, 79, 81, 83, 91, 89, 87, 85, 86
Offset: 1

Views

Author

Boris Putievskiy, Oct 17 2024

Keywords

Comments

Row n has length A064455(n). The sequence A064455 is non-monotonic.
The array consists of two triangular arrays alternating row by row.
For odd n, row n consists of permutations of the integers from A001844((n-1)/2) to A265225(n-1). For even n, row n consists of permutations of the integers from A130883(n/2) to A265225(n-1).
These permutations are generated by the algorithm described A130517.
The sequence is an intra-block permutation of the positive integers.

Examples

			Array begins:
     k =  1   2   3   4   5   6
  n=1:    1;
  n=2:    4,  2,  3;
  n=3:    6,  5;
  n=4:   12, 10,  8,  7,  9, 11;
The triangular arrays alternate by row: n=1 and n=3 comprise one, and n=2 and n=4 comprise the other.
Subtracting (n^2 - 1)/2 if n is odd from each term in row n produces a permutation of 1 .. (n+1)/2. Subtracting (n^2 - n)/2 if n is even from each term in row n produces a permutation of 1 .. 3n/2:
  1,
  3, 1, 2,
  2, 1,
  6, 4, 2, 1, 3, 5,
  ...
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{L,R, P,Result},L=Ceiling[Max[x/.NSolve[x*(2*(x-1)-Cos[Pi*(x-1)]+5)-4*n==0,x,Reals]]]; R=n-If[EvenQ[L],(L^2-L)/2,(L^2-1)/2]; P[(L+1)*(2*L-(-1)^L+5)/4]=If[EvenQ[L],3L/2,(L+1)/2]; P[3]=2; P= Abs[2*R-If[EvenQ[L],3L/2,(L+1)/2]-If[2*R<=If[EvenQ[L],3L/2,(L+1)/2]+1,2,1]]; Res=P+If[EvenQ[L],(L^2-L)/2,(L^2-1)/2]; Result=Res; Result] Nmax= 12; Table[a[n],{n,1,Nmax}]

Formula

Linear sequence:
a(n) = P(n) + B(L(n)-1), where L(n) = ceiling(x(n)), x(n) is largest real root of the equation B(x) - n = 0. B(n) = (n+1)*(2*n-(-1)^n+5)/4 = A265225(n). P(n) = A162630(n)/2.
Array T(n,k) (see Example):
T(n, k) = P(n, k) + (n^2 - n)/2 if n is even, T(n, k) = P(n, k) + (n^2 - 1)/2 if n is odd, T(n, k) = P(n, k) + A265225(n-1). P(n, k) = |2k - 3n / 2 - 2| if n is even and if 2k <= 3n / 2 + 1, P(n, k) = |2k - 3n / 2 - 1| if n is even and if 2k > 3n / 2 + 1. P(n, k) = |2k - (n + 1) / 2 - 2| if n is odd and if 2k <= (n + 1) / 2 + 1, P(n, k) = |2k - (n + 1) / 2 - 1| if n is odd and if 2k > (n + 1) / 2 + 1. There are several special cases: P(n, 1) = 3n/2 if n is even, P(n, 1) = (n+1)/2 if n is odd. P(2, 2) = 1. P(n, n) = n/2 - 1 if n is even, P(n, n) = (n-3)/2 if n is odd.

A343052 Table read by ascending antidiagonals: T(k, n) is the minimum vertex sum in a perimeter-magic k-gon of order n.

Original entry on oeis.org

6, 12, 6, 15, 10, 6, 24, 15, 12, 6, 28, 21, 15, 10, 6, 40, 28, 24, 15, 12, 6, 45, 36, 28, 21, 15, 10, 6, 60, 45, 40, 28, 24, 15, 12, 6, 66, 55, 45, 36, 28, 21, 15, 10, 6, 84, 66, 60, 45, 40, 28, 24, 15, 12, 6, 91, 78, 66, 55, 45, 36, 28, 21, 15, 10, 6, 112, 91, 84, 66, 60, 45, 40, 28, 24, 15, 12, 6
Offset: 3

Views

Author

Stefano Spezia, Apr 03 2021

Keywords

Examples

			The table begins:
k\n|   3   4   5   6   7 ...
---+--------------------
3  |   6   6   6   6   6 ...
4  |  12  10  12  10  12 ...
5  |  15  15  15  15  15 ...
6  |  24  21  24  21  24 ...
7  |  28  28  28  28  28 ...
...
		

Crossrefs

Cf. A000217 (n = 4), A010722 (k = 3), A010854 (k = 5), A010867 (k = 7), A265225, A343053 (maximum).

Programs

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

Formula

O.g.f.: x*(1 + x^2 + y + x*(2 + 3*y))/((1 - x)^3*(1 + x)^2*(1 - y^2)).
E.g.f.: x*((5 + 2*x)*cosh(x + y) - cosh(x - y) + 2*(2 + x)*sinh(x + y))/4.
T(k, n) = k*(1 + k + (n mod 2)*(1 - (k mod 2)))/2.
T(k, 3) = A265225(k-1) (conjectured).

A378127 Inverse permutation to A377137.

Original entry on oeis.org

1, 3, 4, 2, 6, 5, 10, 9, 11, 8, 12, 7, 14, 15, 13, 20, 21, 19, 22, 18, 23, 17, 24, 16, 27, 26, 28, 25, 35, 34, 36, 33, 37, 32, 38, 31, 39, 30, 40, 29, 43, 44, 42, 45, 41, 53, 54, 52, 55, 51, 56, 50, 57, 49, 58, 48, 59, 47, 60, 46, 64, 63, 65, 62, 66, 61, 76, 75, 77, 74, 78, 73, 79, 72, 80, 71, 81, 70, 82, 69, 83, 68, 84, 67, 88, 89, 87, 90, 86, 91
Offset: 1

Views

Author

Boris Putievskiy, Nov 17 2024

Keywords

Comments

Array read by rows (blocks). Each row is a permutation of a block of consecutive numbers; the blocks are disjoint and every positive number belongs to some block.
Row n has length A064455(n). The sequence A064455 is non-monotonic.
Subtracting (n^2 - n)/2 if n is even from each term in row n produces a permutation of 1 .. 3n/2. Subtracting (n^2 - 1)/2 if n is odd from each term in row n produces a permutation of 1 .. (n+1)/2.
These permutations are inverses of the corresponding permutations from A377137. The algorithm used to generate them is described in A209278.
The sequence is an intra-block permutation of the positive integers.

Examples

			Array begins:
     k =  1   2   3   4   5   6
  n=1:    1;
  n=2:    3,  4,  2;
  n=3:    6,  5;
  n=4:   10,  9, 11,  8, 12, 7;
 The triangular arrays alternate by row: n=1 and n=3 comprise one, and n=2 and n=4 comprise the other. Subtracting 1, 4, and 6 from the elements of rows 2, 3, and 4, respectively, produces permutations:
  1;
  2, 3, 1;
  2, 1;
  4, 3, 5, 2, 6, 1;
  ...
These permutations are the inverses of those in Example A377137, listed in the same order.
(2,3,1)^(-1) = (3,1,2); (2,1)^(-1) = (2,1); (4,3,5,2,6,1)^(-1) = (6,4,2,1,3,5).
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=(4n+1+(2n-1)*(-1)^n)/4;P[n_,k_]:=If[EvenQ[b[n]-k],(b[n]-k+2)/2,(b[n]+k+1)/2];Res[n_,k_]:=P[n,k]+(-(-1)^n*n+(-1)^n+2 n^2-n-1)/4;
    Nmax=4;resultTable=Table[Res[n,k],{n,1,Nmax},{k,1,b[n]}]//Flatten

Formula

Array T(n,k) (see Example):
T(n, k) = P(n, k) + A265225(n-1), where
P(n, k) = (b(n) - k + 2)/2 if mod(b(n) - k, 2) = 0,
P(n, k) = (b(n) + k + 1)/2 if mod(b(n) - k, 2) = 1.
b(n) = (4n + 1 + (2n - 1) * (-1)^n)/4 is the length of the row n.

A378626 Table T(n, k) read by upward antidiagonals. T(n,1) = A377137(n), T(n,2) = A377137(A377137(n)), T(n,3) = A377137(A377137(A377137(n))) and so on.

Original entry on oeis.org

1, 4, 1, 2, 3, 1, 3, 4, 2, 1, 6, 2, 3, 4, 1, 5, 5, 4, 2, 3, 1, 12, 6, 6, 3, 4, 2, 1, 10, 11, 5, 5, 2, 3, 4, 1, 8, 7, 9, 6, 6, 4, 2, 3, 1, 7, 10, 12, 8, 5, 5, 3, 4, 2, 1, 9, 12, 7, 11, 10, 6, 6, 2, 3, 4, 1, 11, 8, 11, 12, 9, 7, 5, 5, 4, 2, 3, 1, 15, 9, 10, 9, 11, 8, 12, 6, 6, 3, 4, 2, 1, 13, 14, 8, 7, 8, 9, 10, 11, 5, 5, 2, 3, 4, 1, 14, 15, 13, 10, 12, 10, 8, 7, 9, 6, 6, 4, 2
Offset: 1

Views

Author

Boris Putievskiy, Dec 02 2024

Keywords

Comments

The sequence A377137 generates infinite cyclic group under composition. The identity element is A000027.
Each column is array read by rows. Each row is a permutation of a block of consecutive numbers; the blocks are disjoint and every positive number belongs to some block.
Row n has length A064455(n). The sequence A064455 is non-monotonic.
The array consists of two triangular arrays alternating row by row.
For odd n, row n consists of permutations of the integers from A001844((n-1)/2) to A265225(n-1). For even n, row n consists of permutations of the integers from A130883(n/2) to A265225(n-1).
Each column is an intra-block permutation of the positive integers.

Examples

			Table begins:
  k =      1   2   3   4   5   6
--------------------------------------
  n =  1:  1,  1,  1,  1,  1,  1, ...
  n =  2:  4,  3,  2,  4,  3,  2, ...
  n =  3:  2,  4,  3,  2,  4,  3, ...
  n =  4:  3,  2,  4,  3,  2,  4, ...
  n =  5:  6,  5,  6,  5,  6,  5, ...
  n =  6:  5,  6,  5,  6,  5,  6, ...
  n =  7: 12, 11,  9,  8, 10,  7, ...
  n =  8: 10,  7, 12, 11,  9,  8, ...
  n =  9:  8, 10,  7, 12, 11,  9, ...
  n = 10:  7, 12, 11,  9,  8, 10, ...
  n = 11:  9,  8, 10,  7, 12, 11, ...
  n = 12: 11,  9,  8, 10,  7, 12, ...
  n = 13: 15, 14, 13, 15, 14, 13, ...
  n = 14: 13, 15, 14, 13, 15, 14, ...
  n = 15: 14, 13, 15, 14, 13, 15, ...
Column k = 1 contains the start of A377137. Ord(T(1,1),T(2,1), ... T(15,1)) = 6, ord(T(1,1),T(2,1), ... T(24,1)) = 18, ord(T(1,1),T(2,1), ... T(45,1)) = 90, ord(T(1,1),T(2,1), ... T(112,1)) = 1260, where ord is order of permutation.
The first 6 antidiagonals are:
  1;
  4, 1;
  2, 3, 1;
  3, 4, 2, 1;
  6, 2, 3, 4, 1;
  5, 5, 4, 2, 3, 1;
		

Crossrefs

Cf. A000027, A064455 (row lengths), A265225, A377137, A378127.

Programs

  • Mathematica
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[Max[x/.NSolve[x*(2*(x-1)-Cos[Pi*(x-1)]+5)-4*n==0,x,Reals]]];R=n-If[EvenQ[L],(L^2-L)/2,(L^2-1)/2]; P[(L+1)*(2*L-(-1)^L+5)/4]=If[EvenQ[L],3L/2,(L+1)/2];P[3]=2;P=Abs[2*R-If[EvenQ[L],3L/2,(L+1)/2]-If[2*R<=If[EvenQ[L],3L/2,(L+1)/2]+1,2,1]];Res=P+If[EvenQ[L],(L^2-L)/2,(L^2-1)/2];Result=Res;Result] (*A377137*)
    composeSequence[a_,n_,k_]:=Nest[a,n,k]
    Nmax=15;Kmax=6;T=Table[composeSequence[a,n,k],{n,1,Nmax},{k,1,Kmax}]

Formula

(T(1,k),T(2,k), ... T(A265225(n),k)) is permutation of the integers from 1 to A265225(n). (T(1,k),T(2,k), ... T(A265225(n),k)) = (T(1,1),T(2,1), ... T(A265225(n),1))^k.

A356799 Table read by antidiagonals: T(n,k) (n >= 2, k >= 1) is the number of regions formed in a regular 2n-gon by straight line segments when connecting the k+1 points that divide each side into k equal parts to the equivalent point on the side diagonally opposite.

Original entry on oeis.org

1, 4, 13, 9, 24, 25, 16, 55, 48, 41, 25, 66, 105, 70, 61, 36, 121, 144, 171, 108, 85, 49, 126, 233, 220, 253, 140, 113, 64, 211, 288, 381, 312, 351, 192, 145, 81, 204, 409, 450, 565, 448, 465, 234, 181, 100, 325, 480, 671, 636, 785, 608, 595, 300, 221, 121, 300, 633, 760, 997, 924, 1041, 738, 741, 352, 265
Offset: 2

Views

Author

Scott R. Shannon, Aug 28 2022

Keywords

Comments

Many rows and columns in the table appear to be given by a quadratic in even and odd values of k and n; see the Formula section. The exceptions are for rows with n mod 6 = 0 for even k, and for columns with even k, formulas for which are unknown.

Examples

			The table begins:
    1,   4,    9,   16,   25,   36,   49,    64,    81,   100,   121,   144, ...
   13,  24,   55,   66,  121,  126,  211,   204,   325,   300,   463,   414, ...
   25,  48,  105,  144,  233,  288,  409,   480,   633,   720,   905,  1008, ...
   41,  70,  171,  220,  381,  450,  671,   760,  1041,  1150,  1491,  1620, ...
   61, 108,  253,  312,  565,  636,  997,  1056,  1549,  1596,  2221,  2232, ...
   85, 140,  351,  448,  785,  924, 1387,  1568,  2157,  2380,  3095,  3360, ...
  113, 192,  465,  608, 1041, 1248, 1841,  2112,  2865,  3200,  4113,  4512, ...
  145, 234,  595,  738, 1333, 1512, 2359,  2556,  3673,  3870,  5275,  5454, ...
  181, 300,  741,  960, 1661, 1980, 2941,  3360,  4581,  5100,  6581,  7200, ...
  221, 352,  903, 1144, 2025, 2376, 3587,  4048,  5589,  6160,  8031,  8712, ...
  265, 432, 1081, 1344, 2425, 2784, 4297,  4704,  6697,  7152,  9625, 10080, ...
  313, 494, 1275, 1612, 2861, 3354, 5071,  5720,  7905,  8710, 11363, 12324, ...
  365, 588, 1485, 1904, 3333, 3948, 5909,  6720,  9213, 10220, 13245, 14448, ...
  421, 660, 1711, 2130, 3841, 4410, 6811,  7500, 10621, 11400, 15271, 16110, ...
  481, 768, 1953, 2496, 4385, 5184, 7777,  8832, 12129, 13440, 17441, 19008, ...
  545, 850, 2211, 2788, 4965, 5814, 8807,  9928, 13737, 15130, 19755, 21420, ...
  613, 972, 2485, 3096, 5581, 6444, 9901, 10944, 15445, 16668, 22213, 23544, ...
  .
  .
		

Crossrefs

Formula

T(2,k) = k^2.
Conjectured formula for the rows for odd values of k for n>=3:
T(n,k) = A000217(n-1)*k^2 + n^2*k + A000217(n-2) = (n^2 - n)*k^2/2 + n^2*k + (n^2 - 3n + 2)/2.
E.g., T(7,k) = A000217(6)*k^2 + 7^2*k + A000217(5) = 21k^2 + 49k + 15.
Conjectured formula for the rows for even values of k for n>=3:
For n mod 3 = 1 or n mod 3 = 2, T(n,k) = A000217(n-1)*k^2 + A265225(n-1)*k = (n^2 - n)*k^2/2 + (floor(n/2) + 1)*n*k.
E.g., T(10,k) = A000217(9)*k^2 + A265225(9)*k = 45k^2 + 60k.
For n mod 6 = 0, no formula is currently known.
For (n - 3) mod 6 = 0, T(n,k) = A000096(2n-3)*k^2/4 + A005563(n)*k/2 = (2n^2 - 3n)*k^2/4 + (n^2 + 2n)*k/2.
E.g., T(15,k) = 405k^2/4 + 255k/2.
Conjectured formula for the columns for odd values of k for n>=3:
T(n,k) = A001105((k+1)/2)*n^2 - A051890((k+1)/2)*n + 1 = (k^2 + 2k + 1)*n^2/2 - (k^2 + 3)*n/2 + 1.
E.g., T(n,9) = 50n^2 - 42n + 1.
Conjectured formula for T(n,2):
T(n,2) = 2*A249127(n) = 2*floor(3n/2)*n, for n>=3.
No formula is current known for the columns for even values of k for k>=4.
Showing 1-5 of 5 results.