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

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

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Dec 22 2024

Keywords

Comments

The sequence A376180 generates infinite cyclic group under composition. The identity element is A000027.
Each column can be regarded as a triangular 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. The length of the row number n in each column is the n-th pentagonal number, A000326(n+1).
Each column is an intra-block permutation of the positive integers.

Examples

			Table begins:
  k =      1   2   3   4   5
-----------------------------------
  n =  1:  1,  1,  1,  1,  1, ...
  n =  2:  4,  3,  5,  6,  2, ...
  n =  3:  5,  6,  2,  4,  3, ...
  n =  4:  3,  5,  6,  2,  4, ...
  n =  5:  6,  2,  4,  3,  5, ...
  n =  6:  2,  4,  3,  5,  6, ...
Column k = 1 contains the start of A376180.
Ord(T(1,1),T(2,1), ... T(6,1)) = 5, ord(T(1,1),T(2,1), ... T(18,1)) = 10, ord(T(1,1),T(2,1), ... T(40,1)) = 60, ord(T(1,1),T(2,1), ... T(75,1)) = 420, ord(T(1,1),T(2,1), ... T(126,1)) = 7140, where ord is the order of the permutation.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{L,R,P,Result},L=Ceiling[Max[x/.NSolve[x^2 (x+1)-2 n==0,x,Reals]]];R=n-((L-1)^2)*L/2;P=Which[OddQ[R]&&OddQ[L*(3*L-1)/2],(L*(3*L-1)/2-R+1+1)/2,OddQ[R]&&EvenQ[L*(3*L-1)/2],(R+L*(3*L-1)/2+1)/2,EvenQ[R]&&OddQ[L*(3*L-1)/2],Ceiling[(L*(3*L-1)/2+1)/2]+R/2,EvenQ[R]&&EvenQ[L*(3*L-1)/2],Ceiling[(L*(3*L-1)/2+1)/2]-R/2];
    Result=P+(L-1)^2*L/2;Result] (*A376180*)
    composeSequence[a_,n_,k_]:=Nest[a,n,k]
    Nmax=5;T=Table[composeSequence[a,n,k],{n,1,Nmax},{k,1,Nmax}];T

Formula

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

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.

A377136 Triangle 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. The length of row n is the (n+1)-st Fibonacci number for n > 0; see Comments.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Oct 17 2024

Keywords

Comments

Row n consists of permutation of the integers from F(n+2) to F(n+3) - 1, where F(n) = A000045(n). The permutation is generated using Kevin Ryde's formula from A194959.
The sequence is an intra-block permutation of the positive integers.

Examples

			Triangle begins:
     k =  1   2   3   4   5   6   7   8
  n=1:    1;
  n=2:    2;
  n=3:    3,  4;
  n=4:    5,  7,  6;
  n=5:    8, 10, 12, 11,  9;
  n=6:   13, 15, 17, 19, 20, 18, 16, 14;
Subtracting F(n)-1 from each term in row n produces a permutation of 1 .. F(n):
  1;
  1;
  1,2;
  1,3,2;
  1,3,5,4,2;
  1,3,5,7,8,6,4,2;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Module[{P,Result}, P= If[2*k-1 <=Fibonacci[n],2*k-1,2*(Fibonacci[n]+1-k)]; Result=P+Fibonacci[n+1]-1; Result]; Nmax=6; Table[T[n,k],{n,1,Nmax},{k,1,Fibonacci[n]}]//Flatten

Formula

T(n,k) for 1 <= k <= F(n) (see Example):
T(n,k) = P(n,k) + F(n+1)-1, T(n,k) = P(n,k) + A000045(n+1)-1, where P(n,k) = 2*k-1 if 2*k-1 <= F(n), P(n,k) = 2*(F(n)+1-k) if 2*k-1 > F(n).
Showing 1-3 of 3 results.