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 51-60 of 70 results. Next

A220659 Irregular table: row n (n >= 1) consists of numbers 0..A084558(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 18 2012

Keywords

Comments

The term a(n) gives the position (zero-based, starting from the left hand end of permutation) of a corresponding permutation A055089 and A060117/A060118 from which the term A055089(n) or A060118(n) is to be picked.

Examples

			Rows of this irregular table begin as:
0;
0, 1;
0, 1, 2;
0, 1, 2;
0, 1, 2;
0, 1, 2;
0, 1, 2, 3;
The term 2 occurs four times in A084558, in positions 2, 3, 4 and 5. Thus rows 2, 3, 4 and 5 (zero-based) of this irregular table are all 0,1,2.
		

Programs

Formula

a(n) = n - A220657(A220658(n)).

A178477 Permutations of 1234567: Numbers having each of the decimal digits 1,...,7 exactly once, and no other digit.

Original entry on oeis.org

1234567, 1234576, 1234657, 1234675, 1234756, 1234765, 1235467, 1235476, 1235647, 1235674, 1235746, 1235764, 1236457, 1236475, 1236547, 1236574, 1236745, 1236754, 1237456, 1237465, 1237546, 1237564, 1237645, 1237654
Offset: 1

Views

Author

M. F. Hasler, Oct 09 2010

Keywords

Comments

It would be nice to have a simple explicit formula for the n-th term.
Contains A000142(7) = 5040 terms. - R. J. Mathar, Apr 08 2011
An efficient procedure for generating the n-th term of this sequence can be found at A178475. - Nathaniel Johnston, May 19 2011

Crossrefs

Programs

  • Mathematica
    FromDigits/@Take[Permutations[Range[7]],50] (* Harvey P. Dale, Nov 11 2012 *)
  • PARI
    is_A178477(x)= { vecsort(Vec(Str(x)))==Vec("1234567") }

A178478 Permutations of 12345678: Numbers having each of the decimal digits 1..8 exactly once, and no other digit.

Original entry on oeis.org

12345678, 12345687, 12345768, 12345786, 12345867, 12345876, 12346578, 12346587, 12346758, 12346785, 12346857, 12346875, 12347568, 12347586, 12347658, 12347685, 12347856, 12347865, 12348567, 12348576, 12348657, 12348675, 12348756, 12348765
Offset: 1

Views

Author

M. F. Hasler, Oct 09 2010

Keywords

Comments

It would be nice to have a simple explicit formula for the n-th term.
An efficient procedure for generating the n-th term of this sequence can be found at A178475. - Nathaniel Johnston, May 19 2011

Crossrefs

Programs

  • Mathematica
    Take[FromDigits/@Permutations[Range[8]],40] (* Harvey P. Dale, Oct 29 2014 *)
  • PARI
    is_A178478(x)= { vecsort(Vec(Str(x)))==Vec("12345678") }
    
  • PARI
    A178478(n)={my(b=vector(7,k,1+(n-1)%(k+1)!\k!),t=b[7], d=vector(7,i,i+(i>=t)));for(i=1,6,t=10*t+d[b[7-i]]; d=vecextract(d,Str("^"b[7-i]))); t*10+d[1]} \\ - M. F. Hasler (following N. Johnston's comment), Jan 10 2012

A211362 Inversion sets of finite permutations interpreted as binary numbers.

Original entry on oeis.org

0, 1, 4, 3, 6, 7, 32, 33, 20, 11, 22, 15, 48, 41, 52, 43, 30, 31, 56, 57, 60, 59, 62, 63, 512, 513, 516, 515, 518, 519, 288, 289, 148, 75, 150, 79, 304, 297, 180, 107, 158, 95, 312, 313, 188, 123, 190, 127, 768, 769, 644, 579, 646, 583, 800
Offset: 0

Views

Author

Tilman Piesk, Jun 03 2012

Keywords

Comments

Each finite permutation has a finite inversion set. The possible elements of the inversion sets are 2-element subsets of the integers, which can be ordered in an infinite sequence (compare A018900). Thus the inversion set can be represented by a binary vector, which can be interpreted as a binary number.
This sequence shows these numbers for the finite permutations in reverse colexicographic order (A055089, A195663). The corresponding inversion vectors are found in A007623. The corresponding inversion numbers (A034968) are the digit sums of the inversion vectors and the cardinality of the inversion sets, an thus also the binary digit sums of the numbers in this sequence.
This sequence is not monotonic. The permutation A211363 shows how the elements of this sequence (a) are ordered. a*A211363 gives the elements of a ordered by size.

Examples

			The 4th finite permutation (2,3,1,4,...) has the inversion set {(1,3),(2,3)}. This set represented by a vector is (0,1,1,zeros...). This vector interpreted as a number is 6. So a(4)=6.
The 23rd finite permutation (4,3,2,1,...) has the inversion set {(1,2),(1,3),(2,3),(1,4),(2,4),(3,4)}. This set represented by a vector is (1,1,1,1,1,1,zeros...). This vector interpreted as a number is 63. So a(23)=63.
Beginning of corresponding array:
n    permutation   inversion set    a(n)
00     1 2 3 4     0  0 0  0 0 0     0
01     2 1 3 4     1  0 0  0 0 0     1
02     1 3 2 4     0  0 1  0 0 0     4
03     3 1 2 4     1  1 0  0 0 0     3
04     2 3 1 4     0  1 1  0 0 0     6
05     3 2 1 4     1  1 1  0 0 0     7
06     1 2 4 3     0  0 0  0 0 1    32
07     2 1 4 3     1  0 0  0 0 1    33
08     1 4 2 3     0  0 1  0 1 0    20
09     4 1 2 3     1  1 0  1 0 0    11
10     2 4 1 3     0  1 1  0 1 0    22
11     4 2 1 3     1  1 1  1 0 0    15
12     1 3 4 2     0  0 0  0 1 1    48
13     3 1 4 2     1  0 0  1 0 1    41
14     1 4 3 2     0  0 1  0 1 1    52
15     4 1 3 2     1  1 0  1 0 1    43
16     3 4 1 2     0  1 1  1 1 0    30
17     4 3 1 2     1  1 1  1 1 0    31
18     2 3 4 1     0  0 0  1 1 1    56
19     3 2 4 1     1  0 0  1 1 1    57
20     2 4 3 1     0  0 1  1 1 1    60
21     4 2 3 1     1  1 0  1 1 1    59
22     3 4 2 1     0  1 1  1 1 1    62
23     4 3 2 1     1  1 1  1 1 1    63
		

Crossrefs

A211370 Array read by antidiagonals: T(m,n) = Sum( n <= i <= m+n-1 ) i!.

Original entry on oeis.org

1, 2, 3, 6, 8, 9, 24, 30, 32, 33, 120, 144, 150, 152, 153, 720, 840, 864, 870, 872, 873, 5040, 5760, 5880, 5904, 5910, 5912, 5913, 40320, 45360, 46080, 46200, 46224, 46230, 46232, 46233, 362880, 403200, 408240, 408960, 409080, 409104, 409110, 409112, 409113
Offset: 1

Views

Author

Tilman Piesk, Jul 07 2012

Keywords

Comments

When the numbers denote finite permutations (as row numbers of A055089) these are the circular shifts to the left within an interval. The subsequence A007489 then denotes the circular shifts that start with the first element. Compare A051683 for circular shifts to the right. - Tilman Piesk, Apr 29 2017

Examples

			T(3,2) = Sum( 2 <= i <= 4 ) i! = 2! + 3! + 4! = 32.
The array starts:
  1,    2,     6,     24,     120,      720, ...
  3,    8,    30,    144,     840,     5760, ...
  9,   32,   150,    864,    5880,    46080, ...
33,  152,   870,   5904,   46200,   408960, ...
153,  872,  5910,  46224,  409080,  4037760, ...
873, 5912, 46230, 409104, 4037880, 43954560, ...
		

Crossrefs

Cf. A051683 (circular shifts to the right), A007489 (column n=1), A000142 (row m=1).

Programs

  • Mathematica
    Table[Function[m, Sum[ i!, {i, n, m + n - 1}]][k - n + 1], {k, 9}, {n, k, 1, -1}] // Flatten (* Michael De Vlieger, Apr 30 2017 *)

A237447 Infinite square array: row 1 is the positive integers 1, 2, 3, ..., and on any subsequent row n, n is moved to the front: n, 1, ..., n-1, n+1, n+2, ...

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 10 2014

Keywords

Comments

Row n is the lexicographically earliest permutation of positive integers beginning with n. This also holds for the reverse colexicographic order, thus A007489(n-1) gives the position of n-th row of this array (which is one-based) in zero-based arrays A195663 & A055089.
The finite n X n square matrices in sequence A237265 converge towards this infinite square array.
Rows can be constructed also simply as follows: The first row is A000027 (natural numbers, also known as positive integers). For the n-th row, n=2, ..., pick n out from the terms of A000027 and move it to the front. This will create a permutation with one cycle of length n, in cycle notation: (1 n n-1 n-2 ... 3 2), which is the inverse of (1 2 ... n-1 n).
There are A000110(n) ways to choose n permutations from the n first rows of this table so that their composition is identity (counting all the different composition orders). This comment is essentially the same as my May 01 2006 comment on A000110, please see there for more information. - Antti Karttunen, Feb 10 2014
Also, for n > 1, the whole symmetric group S_n can be generated with just two rows, row 2, which is transposition (1 2), and row n, which is the inverse of cycle (1 ... n). See Rotman, p. 24, Exercise 2.9 (iii).

Examples

			The top left 9 X 9 corner of this infinite square array:
  1 2 3 4 5 6 7 8 9
  2 1 3 4 5 6 7 8 9
  3 1 2 4 5 6 7 8 9
  4 1 2 3 5 6 7 8 9
  5 1 2 3 4 6 7 8 9
  6 1 2 3 4 5 7 8 9
  7 1 2 3 4 5 6 8 9
  8 1 2 3 4 5 6 7 9
  9 1 2 3 4 5 6 7 8
Note how this is also the 9th finite subsquare of the sequence A237265, which can be picked from its terms A237265(205) .. A237265(285), where 205 = 1+A000330(9-1), the starting offset for that 9th subsquare in A237265.
		

References

  • Joseph J. Rotman, An Introduction to the Theory of Groups, 4th ed., Springer-Verlag, New York, 1995. First chapter, pp. 1-19 [For a general introduction], and from chapter 2, problem 2.9, p. 24.

Crossrefs

Transpose: A237448.
Topmost row and the leftmost column: A000027. Second column: A054977. Central diagonal: A028310 (note the different starting offsets).
Antidiagonal sums: A074148.
This array is the infinite limit of the n X n square matrices in A237265.

Programs

  • Maple
    T:= proc(r,c) if c > r then c elif c=1 then r else c-1 fi end proc:
    seq(seq(T(r,n-r),r=1..n-1),n=1..20); # Robert Israel, May 09 2017
  • Mathematica
    Table[Function[n, If[k == 1, n, k - Boole[k <= n]]][m - k + 1], {m, 15}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • PARI
    A237447(n,k=0)=if(k, if(k>1, k-(k<=n), n), A237447(A002260(n), A004736(n))) \\ Yields the element [n,k] of the matrix, or the n-th term of the "linearized" sequence if no k is given. - M. F. Hasler, Mar 09 2014
  • Scheme
    (define (A237447 n) (+ (* (A010054 n) (A002024 n)) (* (- 1 (A010054 n)) (- (A004736 n) (if (>= (A002260 n) (A004736 n)) 1 0)))))
    ;; Another variant based on Cano's A237265.
    (define (A237447 n) (let* ((row (A002260 n)) (col (A004736 n)) (sss (max row col)) (sof (+ 1 (A000330 (- sss 1))))) (A237265 (+ sof (* sss (- row 1)) (- col 1)))))
    

Formula

When col > row, T(row,col) = col, when 1 < col <= row, T(row,col) = col-1, and when col=1, T(row,1) = row.
a(n) = A010054(n) * A002024(n) + (1-A010054(n)) * (A004736(n) - [A002260(n) >= A004736(n)]). [This gives the formula for this entry represented as a one-dimensional sequence. Here the expression inside Iverson brackets results 1 only when the row index (A002260) is greater than or equal to the column index (A004736), otherwise zero. A010054 is the characteristic function for the triangular numbers, A000217.]
T(row,col) = A237265((A000330(max(row,col)-1)+1) + (max(row,col)*(row-1)) + (col-1)). [Takes the infinite limit of n X n matrices of A237265.]
G.f. as array: g(x,y) = (1 - 4*x*y + 3*x*y^2 + x^2*y - x*y^3)*x*y/((1-x*y)*(1-x)^2*(1-y)^2). - Robert Israel, May 09 2017

A261098 Row 1 of A261096.

Original entry on oeis.org

1, 0, 4, 5, 2, 3, 7, 6, 10, 11, 8, 9, 18, 19, 20, 21, 22, 23, 12, 13, 14, 15, 16, 17, 25, 24, 28, 29, 26, 27, 31, 30, 34, 35, 32, 33, 42, 43, 44, 45, 46, 47, 36, 37, 38, 39, 40, 41, 49, 48, 52, 53, 50, 51, 55, 54, 58, 59, 56, 57, 66, 67, 68, 69, 70, 71, 60, 61, 62, 63, 64, 65, 96, 97, 98, 99, 100, 101
Offset: 0

Views

Author

Antti Karttunen, Aug 26 2015

Keywords

Comments

Equally, column 1 of A261097.
Take the n-th (n>=0) permutation from the list A055089 (A195663), change 1 to 2 and 2 to 1 to get another permutation, and note its rank in the same list to obtain a(n).
Self-inverse permutation of nonnegative integers.

Examples

			In A195663 the permutation with rank 12 is [1,3,4,2], and swapping the elements 1 and 2 we get permutation [2,3,4,1], which is listed in A195663 as the permutation with rank 18, thus a(12) = 18.
		

Crossrefs

Row 1 of A261096, column 1 of A261097.
Cf. also A004442.
Related permutations: A060119, A060126, A261218.

Formula

a(n) = A261096(1,n).
By conjugating related permutations:
a(n) = A060119(A261218(A060126(n))).

A064039 Reversed inversion vectors for the permutations of A060117, presented as pseudo-decimal numbers.

Original entry on oeis.org

0, 1, 10, 11, 21, 20, 100, 101, 110, 111, 121, 120, 210, 211, 200, 201, 220, 221, 311, 310, 321, 320, 301, 300, 1000, 1001, 1010, 1011, 1021, 1020, 1100, 1101, 1110, 1111, 1121, 1120, 1210, 1211, 1200, 1201, 1220, 1221, 1311, 1310, 1321, 1320, 1301, 1300
Offset: 1

Views

Author

Antti Karttunen, Aug 23 2001

Keywords

Comments

If one uses the ordering of A055089 instead of A060117 (procedure PermRevLexUnrank instead of PermUnrank3R) one gets A007623 (Integers written in factorial base) which is a permutation of this sequence.

Crossrefs

SiteSwap2ToDec procedure given in A060496 and PermUnrank3R in A060117.

Programs

  • Maple
    [seq(SiteSwap2ToDec(Perm2InversionVector(PermUnrank3R(j))),j=0..119)];
    Perm2InversionVector := proc(p) local n,i,j,a,c; n := nops(p); a := []; for i from 2 to n do c := 0; for j from 1 to i-1 do if(p[j] > p[i] then c := c+1; fi; od; a := [op(a),c]; od; RETURN(a); end;

A064637 Setwise difference of A060132 and A059590. Those terms of A060132 which are not representable as a sum of distinct factorials.

Original entry on oeis.org

16, 17, 40, 41, 60, 61, 62, 63, 136, 137, 160, 161, 180, 181, 182, 183, 288, 289, 290, 291, 294, 295, 296, 297, 304, 305, 316, 317, 450, 451, 452, 453, 736, 737, 760, 761, 780, 781, 782, 783, 856, 857, 880, 881, 900, 901, 902, 903, 1008, 1009, 1010, 1011
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2001

Keywords

Comments

16 is included, as 16 = 220 in factorial base and by following the algorithm PermRevLexUnrankAMSD in A055089 we get the composition (2 3)(3 4) (1 2)(2 3) which, although consisting of different transpositions, is equal to the composition (4 2)(3 1) = 3412 produced by algorithm PermUnrank3R at A060117.

Crossrefs

A064637 := list_diff(A060132, A059590),
Cf. A064477.

Programs

  • Maple
    list_diff := proc(a,b) local c,e; c := []; for e in a do if(not member(e,b)) then c := [op(c),e]; fi; od; RETURN(c); end;

A100630 Array read by antidiagonals: T(m,n) = Sum(1<=i<=m) [ i*(n-1+i)! ].

Original entry on oeis.org

1, 2, 5, 6, 14, 23, 24, 54, 86, 119, 120, 264, 414, 566, 719, 720, 1560, 2424, 3294, 4166, 5039, 5040, 10800, 16680, 22584, 28494, 34406, 40319, 40320, 85680, 131760, 177960, 224184, 270414, 316646, 362879, 362880, 766080, 1174320, 1583280
Offset: 1

Views

Author

Eugene McDonnell (eemcd(AT)mac.com), Dec 03 2004

Keywords

Comments

Inversion vector corresponding to T(m,n): ( n zeros , 1,2,3,...,m , zeros... )
These are the numbers of permutations (in reverse colexicographical order, compare A055089) that reverse a set of consecutive elements and leave all other elements unchanged. Permutation A(m,n) reverses all elements from n to m+n.
The former title of this sequence refers to finite tables of permutations in lexicographical order: "Triangle read by rows: row n gives the index number in the tables of permutations of order n+1, n+2, ... of the permutation in which the first n items are reversed and the remaining items are in order."

Examples

			T(3,2) = Sum( 1 <= i <= 3 ) [ i * (1+i)! ]
= 1*(1+1)! + 2*(1+2)! + 3*(1+3)!
= 1*2 + 2*6 + 3*24
= 86
		

Crossrefs

See A100711 for another version. Row 2 is A052649.

Extensions

Rewritten by Tilman Piesk, Jul 13 2012
Previous Showing 51-60 of 70 results. Next