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 81-90 of 163 results. Next

A255565 a(0) = 0; for n >= 1: if n = A255411(k) for some k, then a(n) = 2*a(k), otherwise, n = A256450(h) for some h, and a(n) = 1 + 2*a(h).

Original entry on oeis.org

0, 1, 3, 7, 2, 15, 5, 31, 11, 63, 23, 127, 6, 47, 255, 13, 14, 95, 4, 511, 27, 29, 30, 191, 9, 1023, 55, 59, 61, 383, 19, 2047, 111, 119, 123, 767, 39, 4095, 223, 239, 247, 1535, 79, 8191, 447, 479, 495, 3071, 10, 159, 16383, 895, 62, 959, 991, 6143, 21, 319, 32767, 1791, 22, 125, 1919, 1983, 126, 12287, 46, 43, 639, 65535, 254, 3583, 12
Offset: 0

Views

Author

Antti Karttunen, May 05 2015

Keywords

Comments

Because all terms of A255411 are even it means that even terms can only occur in even positions (together with some odd terms, for each one of which there is a separate infinite cycle), while terms in odd positions are all odd.

Crossrefs

Inverse: A255566.
Cf. also arrays A257503, A257505.
Related or similar permutations: A273665, A273668.

Formula

a(0) = 0; for n >= 1: if A257680(n) = 0 [i.e., n is one of the terms of A255411], then a(n) = 2*a(A257685(n)), otherwise [when n is one of the terms of A256450], a(n) = 1 + 2*a(A273662(n)).
Other identities:
For all n >= 1, A001511(a(n)) = A257679(n).
For all n >= 1, a(A001563(n)) = A000079(n-1) = 2^(n-1).
For all n >= 1, a(A000142(n)) = A083318(n-1).

Extensions

Formula changed because of the changed starting offset of A256450 - Antti Karttunen, May 30 2016

A260355 Table T(n,k) read by antidiagonals. T(n,k) is the minimum value of Sum_{i=1..n} Product_{j=1..k} r_j[i] where each r_j is a permutation of {1..n}.

Original entry on oeis.org

1, 1, 3, 1, 4, 6, 1, 6, 10, 10, 1, 8, 18, 20, 15, 1, 12, 33, 44, 35, 21, 1, 16, 60, 96, 89, 56, 28, 1, 24, 108, 214, 231, 162, 84, 36, 1, 32, 198, 472, 600, 484, 271, 120, 45, 1, 48, 360, 1043, 1564, 1443, 915, 428, 165, 55, 1, 64, 648, 2304, 4074, 4320, 3089, 1608, 642, 220, 66, 1, 96, 1188, 5136, 10618
Offset: 1

Views

Author

Chai Wah Wu, Jul 29 2015

Keywords

Comments

T(1,k) = 1. T(2,k) = A029744(k+2). T(n,1) = n(n+1)/2 (= A000217(n)). See arXiv link for sets of permutations that achieve the value of T(n,k).

Examples

			(Partially filled in) table starts (with n rows and k columns):
(Third column is A070735, fourth column is A070736)
   k    1   2     3     4     5     6     7     8     9    10    11    12     13     14     15
  --------------------------------------------------------------------------------------------
n  1|   1   1     1     1     1     1     1     1     1     1     1     1      1      1      1
   2|   3   4     6     8    12    16    24    32    48    64    96   128    192    256    384
   3|   6  10    18    33    60   108   198   360   648  1188  2145  3888   7083  12844  23328
   4|  10  20    44    96   214   472  1043  2304  5136 11328 24993 55296 122624 271040 599832
   5|  15  35    89   231   600  1564  4074 10618
   6|  21  56   162   484  1443  4320
   7|  28  84   271   915  3089
   8|  36 120   428  1608
   9|  45 165   642  2664
  10|  55 220   930  4208
  11|  66 286  1304
  12|  78 364  1781
  13|  91 455  2377
  14| 105 560  3111
  15| 120 680  4002
(Partially filled in) table of how many nonequivalent sets of permutations achieves the value of T(n,k)
   k    1    2     3     4     5     6     7     8     9    10    11    12    13     14     15
  --------------------------------------------------------------------------------------------
n  1|   1    1     1     1     1     1     1     1     1     1     1     1     1      1      1
   2|   1    1     1     1     1     1     1     1     1     1     1     1     1      1      1
   3|   1    1     1     1     1     2     1     2     2     2     1     3     1      1      3
   4|   1    1     2     4    11    10    10    81   791   533    24  1461  3634    192   2404
   5|   1    1     3    12    16   188   211  2685
   6|   1    1    10   110    16
   7|   1    1     6
   8|   1    1    16
   9|   1    1     4
  10|   1    1    12
  11|   1    1
  12|   1    1
  13|   1    1
  14|   1    1
  15|   1    1
		

Crossrefs

Cf. A001563, A029744, A000217, A000292 (T(n,2)), A070735 (T(n,3)), A070736 (T(n,4)).

Programs

  • Python
    from itertools import permutations, combinations_with_replacement
    def A260355(n,k): # compute T(n,k)
        if k == 1:
            return n*(n+1)//2
        ntuple, count = tuple(range(1,n+1)), n**(k+1)
        for s in combinations_with_replacement(permutations(ntuple,n),k-2):
            t = list(ntuple)
            for d in s:
                for i in range(n):
                    t[i] *= d[i]
            t.sort()
            v = 0
            for i in range(n):
                v += (n-i)*t[i]
            if v < count:
                count = v
        return count

Formula

From Chai Wah Wu, Feb 24 2020: (Start)
T(n,k) >= n*(n!)^(k/n).
If n divides k, then T(n,k) = n*(n!)^(k/n).
T(n,n) = (n+1)! - n! = A001563(n).
T(n,2) = n*(n+1)*(n+2)/6 = A000292(n).
(End)

A023044 7th differences of factorial numbers.

Original entry on oeis.org

1854, 16687, 165016, 1781802, 20886576, 264398280, 3597143040, 52370755920, 812752093440, 13397819541120, 233845982899200, 4309095479673600, 83609603781580800, 1704092533657113600, 36403110891295948800
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Differences[Range[0, 25]!, 7] (* Paolo Xausa, May 26 2025 *)

A047922 Triangle of numbers a(n,k) = number of terms in n X n determinant with 2 adjacent diagonals of k and k-1 0's (0<=k<=n).

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 6, 4, 1, 1, 24, 18, 8, 5, 3, 120, 96, 54, 34, 23, 16, 720, 600, 384, 258, 182, 131, 96, 5040, 4320, 3000, 2136, 1566, 1168, 883, 675, 40320, 35280, 25920, 19320, 14664, 11274, 8756, 6859, 5413, 362880, 322560, 246960, 190800, 149160, 117696, 93582, 74902, 60301, 48800
Offset: 0

Views

Author

Keywords

Examples

			Triangle starts:
  1;
  1, 0;
  2, 1, 0;
  6, 4, 1, 1;
  ...
		

Crossrefs

Columns give A000142, A001563, A002775, A002776. Cf. A047920.

Programs

  • Maple
    a:= proc(n, k) option remember; `if`(k=0, n!, `if`(n=k,
          `if`(n<3, (n-1)*(n-2)/2, (n-1)*(a(n-1$2)+a(n-2$2))
          +a(n-3$2)), a(n, k+1) +2*a(n-1, k) +a(n-2, k-1)))
        end:
    seq(seq(a(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Jun 24 2017
  • Mathematica
    a[n_, n_] := (-1)^n*HypergeometricPFQ[{1, -n, n+1}, {1/2}, 1/4]; a[n_, k_] := a[n, k] = a[n, k+1] + 2*a[n-1, k] + a[n-2, k-1]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 24 2015 *)

Formula

Right diagonal is A000271, column k=0 is A000142; other entries given by a(n, k) = a(n, k+1) + 2a(n-1, k) + a(n-2, k-1).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 29 2000

A061312 Triangle T[n,m]: T[n,-1] = 0; T[0,0] = 0; T[n,0] = n*n!; T[n,m] = T[n,m-1] - T[n-1,m-1].

Original entry on oeis.org

0, 1, 1, 4, 3, 2, 18, 14, 11, 9, 96, 78, 64, 53, 44, 600, 504, 426, 362, 309, 265, 4320, 3720, 3216, 2790, 2428, 2119, 1854, 35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833, 322560, 287280, 256320, 229080, 205056, 183822, 165016, 148329
Offset: 0

Views

Author

Wouter Meeussen, Jun 06 2001

Keywords

Comments

Appears in the (n,k)-matching problem A076731. [Johannes W. Meijer, Jul 27 2011]

Examples

			0,
1, 1,
4, 3, 2,
18, 14, 11, 9,
96, 78, 64, 53, 44,
600, 504, 426, 362, 309, 265,
4320, 3720, 3216, 2790, 2428, 2119, 1854,
35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833,
		

Crossrefs

Cf. A061018.
From Johannes W. Meijer, Jul 27 2011: (Start)
The row sums equal A193465. (End)

Programs

  • Magma
    [[(&+[(-1)^j*Binomial(k+1,j)*Factorial(n-j+1): j in [0..k+1]]): k in [0..n]]: n in [0..20]]; // G. C. Greubel, Aug 13 2018
  • Maple
    A061312 := proc(n,m): add(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) end: seq(seq(A061312(n,m), m=0..n), n=0..7); # Johannes W. Meijer, Jul 27 2011
  • Mathematica
    T[n_, k_]:= Sum[(-1)^j*Binomial[k + 1, j]*(n + 1 - j)!, {j, 0, k + 1}]; Table[T[n, k], {n, 0, 100}, {k, 0, n}] // Flatten  (* G. C. Greubel, Aug 13 2018 *)
  • PARI
    for(n=0,20, for(k=0,n, print1(sum(j=0,k+1, (-1)^j*binomial(k+1,j) *(n-j+1)!), ", "))) \\ G. C. Greubel, Aug 13 2018
    

Formula

T[n,m] = T[n,m-1]-T[n-1,m-1] with T[n,-1] = 0 and T[n,0] = A001563(n) = n*n!
T(n,m) = sum(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) [Johannes W. Meijer, Jul 27 2011]

A083746 a(1) = 1, a(2) = 2; for n>2, a(n) = 3*(n-2)*(n-2)!.

Original entry on oeis.org

1, 2, 3, 12, 54, 288, 1800, 12960, 105840, 967680, 9797760, 108864000, 1317254400, 17244057600, 242853811200, 3661488230400, 58845346560000, 1004293914624000, 18140058832896000, 345728180109312000, 6933770723303424000
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 06 2003

Keywords

Comments

a(1) = 1, a(2) = 2, define S(k) = sum of all the terms other than a(k) k < n. a(n) = Sum_{k=1..n-1} S(k).

Examples

			a(4) = {a(1) + a(2)} + {a(1) +a(3)} + {a(2) + a(3)} = 12.
		

Crossrefs

Programs

  • Magma
    [n le 2 select n else 3*(n-2)*Factorial(n-2): n in [1..40]]; // G. C. Greubel, Feb 03 2024
    
  • Maple
    a := proc(n) option remember: if n=1 then RETURN(1) fi: if n=2 then RETURN(2) fi: 3*(n-2)*(n-2)! end: for n from 1 to 40 do printf(`%d,`,a(n)) od: # James Sellers, May 19 2003
  • Mathematica
    Join[{1,2},Table[3n n!,{n,20}]] (* Harvey P. Dale, Feb 27 2012 *)
  • SageMath
    [1,2]+[3*(n-2)*factorial(n-2) for n in range(3, 41)] # G. C. Greubel, Feb 03 2024

Formula

a(n) = (n-2)*Sum_{j=1..n-1} a(j).
E.g.f.: 3*(x-2)*log(1-x) - 5*x + x^2. - Vladeta Jovovic, May 06 2003
From Reinhard Zumkeller, Apr 14 2007: (Start)
Sum_{k=1..n} a(k) = A052560(n-1) for n > 1.
a(n) = A052673(n-2) for n > 2. (End)

Extensions

Simpler description from Vladeta Jovovic, May 06 2003
More terms from James Sellers, May 19 2003

A091363 a(n) = n!*n^3.

Original entry on oeis.org

0, 1, 16, 162, 1536, 15000, 155520, 1728720, 20643840, 264539520, 3628800000, 53129260800, 827714764800, 13680764697600, 239217231052800, 4413400992000000, 85699747381248000, 1747492334235648000, 37338643451805696000, 834363743704178688000
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2004

Keywords

Comments

Denominators in the power series expansion of the higher order exponential integral E(x,3,1) + (gamma^3/6+Pi^2*gamma/36+zeta(3)/3+Pi^2*gamma/18) + (gamma^2/2+Pi^2/12)*log(x) + gamma*log(x)^2/2 + log(x)^3/6, n>0. See A163931 for information on the E(x,m,n). - Johannes W. Meijer, Oct 16 2009

Crossrefs

Cf. A163931 (E(x,m,n)), A001563 (n*n!), A002775 (n^2*n!), A091364 (n^4*n!). - Johannes W. Meijer, Oct 16 2009

Programs

  • Magma
    [Factorial(n)*n^3: n in [0..40]]; // Vincenzo Librandi, Jun 25 2015
  • Maple
    a:=n->sum(sum(sum((n!), j=1..n),k=1..n),m=1..n): seq(a(n), n=0..17); # Zerinvary Lajos, May 16 2007
  • Mathematica
    Table[n!n^3, {n, 0, 20}]

Formula

E.g.f.: (x+4x^2+x^3)/(1-x)^4.

A094791 Triangle read by rows giving coefficients of polynomials arising in successive differences of (n!)_{n>=0}.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 3, 5, 2, 1, 6, 17, 20, 9, 1, 10, 45, 100, 109, 44, 1, 15, 100, 355, 694, 689, 265, 1, 21, 196, 1015, 3094, 5453, 5053, 1854, 1, 28, 350, 2492, 10899, 29596, 48082, 42048, 14833, 1, 36, 582, 5460, 32403, 124908, 309602, 470328, 391641, 133496
Offset: 0

Views

Author

Benoit Cloitre, Jun 11 2004

Keywords

Comments

Let D_0(n)=n! and D_{k+1}(n)=D_{k}(n+1)-D_{k}(n), then D_{k}(n)=n!*P_{k}(n) where P_{k} is a polynomial with integer coefficients of degree k.
The horizontal reversal of this triangle arises as a binomial convolution of the derangements coefficients der(n,i) (numbers of permutations of size n with i derangements = A098825(n,i) = number of permutations of size n with n-i rencontres = A008290(n,n-i), see formula section). - Olivier Gérard, Jul 31 2011

Examples

			D_3(n) = n!*(n^3 + 3*n^2 + 5*n + 2).
D_4(n) = n!*(n^4 + 6*n^3 + 17*n^2 + 20*n + 9).
Table begins:
  1
  1  0
  1  1   1
  1  3   5   2
  1  6  17  20    9
  1 10  45 100  109   44
  1 15 100 355  694  689  265
  ...
		

Crossrefs

Successive differences of factorial numbers: A001563, A001564, A001565, A001688, A001689, A023043.
Rencontres numbers A008290. Partial derangements A098825.
Row sum is A000255. Signed version in A126353.

Programs

  • Maple
    with(LREtools): A094791_row := proc(n)
    delta(x!,x,n); simplify(%/x!); seq(coeff(%,x,n-j),j=0..n) end:
    seq(print(A094791_row(n)),n=0..9); # Peter Luschny, Jan 09 2015
  • Mathematica
    d[0][n_] := n!; d[k_][n_] := d[k][n] = d[k - 1][n + 1] - d[k - 1][n] // FullSimplify;
    row[k_] := d[k][n]/n! // FullSimplify // CoefficientList[#, n]& // Reverse;
    Array[row, 10, 0] // Flatten (* Jean-François Alcover, Aug 02 2019 *)

Formula

T(n, n) = A000166(n).
T(2, k) = A000217(k).
Sum_{k=0..n} T(n,n-k)*x^k = Sum_{i=0..n} der(n,i)*binomial( n+x, i) (an analog of Worpitzky's identity). - Olivier Gérard, Jul 31 2011

Extensions

Edited and T(0,0) corrected according to the author's definition by Olivier Gérard, Jul 31 2011

A196347 Triangle T(n, k) read by rows, T(n, k) = n!*binomial(n, k).

Original entry on oeis.org

1, 1, 1, 2, 4, 2, 6, 18, 18, 6, 24, 96, 144, 96, 24, 120, 600, 1200, 1200, 600, 120, 720, 4320, 10800, 14400, 10800, 4320, 720, 5040, 35280, 105840, 176400, 176400, 105840, 35280, 5040, 40320, 322560, 1128960, 2257920, 2822400, 2257920, 1128960, 322560, 40320
Offset: 0

Views

Author

Philippe Deléham, Oct 28 2011

Keywords

Comments

Unsigned version of A021012.
Equal to A136572*A007318.

Examples

			Triangle begins:
    1;
    1,   1;
    2,   4,    2;
    6,  18,   18,    6;
   24,  96,  144,   96,  24;
  120, 600, 1200, 1200, 600, 120;
  ...
		

Crossrefs

Programs

  • Magma
    /* As triangle */ [[Factorial(n)*Binomial(n, k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 28 2015
  • Mathematica
    Table[n!*Binomial[n, j], {n, 0, 30}, {j, 0, n}] (* G. C. Greubel, Sep 27 2015 *)
  • Sage
    factorial(n)*binomial(n,k) # Danny Rorabaugh, Sep 27 2015
    

Formula

T(n,k) is given by (1,1,2,2,3,3,4,4,5,5,6,6,...) DELTA (1,1,2,2,3,3,4,4,5,5,6,6, ...) where DELTA is the operator defined in A084938.
Sum_{k>=0} T(m,k)*T(n,k) = (m+n)!.
T(2n,n) = A122747(n).
Sum_{k>=0} T(n,k)^2 = A010050(n) = (2n)!.
Sum_{k>=0} T(n,k)*x^k = A000007(n), A000142(n), A000165(n), A032031(n), A047053(n), A052562(n), A047058(n), A051188(n), A051189(n), A051232(n), A051262(n), A196258(n), A145448(n) for x = -1,0,1,2,3,4,5,6,7,8,9,10,11 respectively.
The row polynomials have the form (x + 1) o (x + 2) o ... o (x + n), where o denotes the black diamond multiplication operator of Dukes and White. See example E10 in the Bala link. - Peter Bala, Jan 18 2018

Extensions

Name exchanged with a formula by Peter Luschny, Feb 01 2015

A207324 List of permutations of 1,2,3,...,n for n=1,2,3,..., in the order they are output by Steinhaus-Johnson-Trotter algorithm.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 1, 3, 1, 2, 3, 4, 1, 2, 4, 3, 1, 4, 2, 3, 4, 1, 2, 3, 4, 1, 3, 2, 1, 4, 3, 2, 1, 3, 4, 2, 1, 3, 2, 4, 3, 1, 2, 4, 3, 1, 4, 2, 3, 4, 1, 2, 4, 3, 1, 2, 4, 3, 2, 1, 3, 4, 2, 1, 3, 2, 4, 1, 3, 2, 1, 4
Offset: 1

Views

Author

R. J. Cano, Sep 14 2012

Keywords

Comments

This table is otherwise similar to A030298, but lists permutations in the order given by the Steinhaus-Trotter-Johnson algorithm. - Antti Karttunen, Dec 28 2012

Examples

			For the set of the first two natural numbers {1,2} the unique permutations possible are 12 and 21, concatenated with 1 for {1} the resulting sequence would be 1, 1, 2, 2, 1.
If we consider up to 3 elements {1,2,3}, we have 123, 132, 312, 321, 231, 213 and the concatenation gives: 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 1, 3.
Up to N concatenations, the sequence will have a total of Sum_{k=1..N} (k! * k) = (N+1)! - 1 = A033312(N+1) terms.
		

Crossrefs

Cf. A001563 (row lengths), A001286 (row sums).
Pair (A130664(n),A084555(n)) = (1,1),(2,3),(4,5),(6,8),(9,11),(12,14),... gives the starting and ending offsets of the n-th permutation in this list.

Extensions

Previous Showing 81-90 of 163 results. Next