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.

A094258 a(1) = 1, a(n+1) = n*n! for n >= 1.

Original entry on oeis.org

1, 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920, 36288000, 439084800, 5748019200, 80951270400, 1220496076800, 19615115520000, 334764638208000, 6046686277632000, 115242726703104000, 2311256907767808000, 48658040163532800000, 1072909785605898240000, 24728016011107368960000, 594596384994354462720000
Offset: 1

Views

Author

Amarnath Murthy, Apr 26 2004

Keywords

Comments

The old definition was: "a(1) = 1, a(n+1) = n*(a(1) + a(2) + ... + a(n))."
a(n) is the number of positive integers k <= n! such that k is not divisible by n. It is also the number of rationals in (0,1] which can be written in the form m/n! but not in the form m/(n-1)!. - Jonathan Sondow, Aug 14 2006
Also, the number of monomials in the determinant of an n X n symbolic matrix with only one zero entry. The position of the zero in the matrix is not important. - Artur Jasinski, Apr 02 2008
From Zak Seidov, Jun 21 2005: (Start)
The number of integers that use each of the decimal digits 0 through n exactly once is the finite sequence 1, 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920, because there are (n+1)! permutations of decimal digits 0 through n, from which we remove the n! permutations with leading zero and get n*n! = total number of integers that use each of the decimal digits from 0 through n exactly once. For n=0 we have 1 integer (0) which uses zero exactly once, hence a(0)=1 by definition.
This sequence is finite because there are only 10 decimal digits. With the initial 1 replaced by 0, we get the initial terms of A001563, which is infinite. Cf. A109075 = number of primes which use each of the decimal digits from 0 through n exactly once. (End)
Partial sums yield factorial numbers A000142(n) = n! = (1, 2, 6, 24, 120, 720, ...). - Vladimir Joseph Stephan Orlovsky, Jun 27 2009

Examples

			a(1) = 1;
a(2) = 1*a(1) = 1;
...
a(7) = 6*(a(1) + a(2) + ... + a(6)) = 6*(1 + 1 + 4 + 18 + 96 + 600) = 4320.
		

Crossrefs

Up to the offset and initial value, the same as A001563, cf. formula.
Cf. A109075.

Programs

Formula

a(n+1) = n*n! = A001563(n) for n>=1.
From Jonathan Sondow, Aug 14 2006: (Start)
a(n) = n! - (n-1)! for n >= 2.
a(n) = n! - a(n-1) - a(n-2) - ... - a(1). with a(1) = 1. (End)
a(n) = A094304(n+1) = A001563(n-1) for n >= 2. - Jaroslav Krizek, Oct 16 2009
G.f.: 1/Q(0), where Q(k)= 1 + x/(1-x) - x/(1-x)*(k+2)/(1 - x/(1-x)*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 22 2013
G.f.: W(0)*(1-sqrt(x)), where W(k) = 1 + sqrt(x)/( 1 - sqrt(x)*(k+2)/(sqrt(x)*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 18 2013

Extensions

Edited by Mark Hudson, Jan 05 2005
More terms from R. J. Mathar, Jul 27 2007
Edited by M. F. Hasler, Oct 21 2012
Edited by Jon E. Schoenfield, Jan 17 2015
Definition simplified by M. F. Hasler, Jun 28 2016

A122974 Triangle T(n,k), the number of permutations on n elements that have no cycles of length k.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 9, 15, 16, 18, 44, 75, 80, 90, 96, 265, 435, 520, 540, 576, 600, 1854, 3045, 3640, 3780, 4032, 4200, 4320, 14833, 24465, 29120, 31500, 32256, 33600, 34560, 35280, 133496, 220185, 259840, 283500, 290304, 302400, 311040, 317520, 322560
Offset: 1

Views

Author

Dennis P. Walsh, Oct 27 2006

Keywords

Comments

Read as sequence, a(n) is the number of permutations on j elements with no cycles of length i where j=round((2*n)^.5) and i=n-C(j,2).
T(n,k) generalizes several sequences already in the On-Line Encyclopedia, such as A000166, the number of permutations on n elements with no fixed points and A000266, the number of permutations on n elements with no transpositions (i.e., no 2-cycles). See the cross references for further examples.

Examples

			T(3,2)=3 since there are exactly 3 permutations of 1,2,3 that have no cycles of length 2, namely, (1)(2)(3),(1 2 3) and (2 1 3).
Triangle T(n,k) begins:
      0;
      1,     1;
      2,     3,     4;
      9,    15,    16,    18;
     44,    75,    80,    90,    96;
    265,   435,   520,   540,   576,   600;
   1854,  3045,  3640,  3780,  4032,  4200,  4320;
  14833, 24465, 29120, 31500, 32256, 33600, 34560, 35280;
  ...
		

Crossrefs

Cf. T(n, 1)=A000166 for n=>1 T(n, 2)=A000266 for n=>2 T(n, 3)=A000090 for n=>3 T(n, 4)=A000138 for n=>4 T(n, 5)=A060725 for n=>5 T(n, 6)=A060726 for n=>6 T(n, 7)=A060727 for n=>7.
T(n,n) gives A094304(n+1).

Programs

  • Maple
    seq((round((2*n)^.5))!*sum((-1/(n-binomial(round((2*n)^.5),2)))^r/r!,r=0..floor(round((2*n)^.5)/(n-binomial(round((2*n)^.5),2)))),n=1..66);
    # second Maple program:
    T:= proc(n, k) option remember; `if`(n=0, 1, add(`if`(j=k, 0,
          T(n-j, k)*binomial(n-1, j-1)*(j-1)!), j=1..n))
        end:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Nov 24 2019
  • Mathematica
    T[n_, k_] := T[n, k] = If[n==0, 1, Sum[If[j==k, 0, T[n - j, k] Binomial[n - 1, j - 1] (j - 1)!], {j, 1, n}]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Dec 08 2019, after Alois P. Heinz *)

Formula

T(n,k)=n!*sum r=0..floor(n/k)((-1/k)^r/r!) E.G.F: exp(-x^k/k)/(1-x) a(n)=(round((2*n)^.5))!*sum((-1/(n-binomial(round((2*n)^.5),2)))^r/r!,r=0..floor(round((2*n)^.5)/(n-binomial(round((2*n)^.5),2)))).
T(n,k) = n! - A293211(n,k). - Alois P. Heinz, Nov 24 2019

A177263 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k as the last entry in the first block (1<=k<=n).

Original entry on oeis.org

1, 0, 2, 1, 1, 4, 4, 5, 5, 10, 18, 22, 23, 23, 34, 96, 114, 118, 119, 119, 154, 600, 696, 714, 718, 719, 719, 874, 4320, 4920, 5016, 5034, 5038, 5039, 5039, 5914, 35280, 39600, 40200, 40296, 40314, 40318, 40319, 40319, 46234, 322560, 357840, 362160, 362760, 362856, 362874, 362878, 362879, 362879, 409114
Offset: 1

Views

Author

Emeric Deutsch, May 16 2010

Keywords

Comments

A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions. For example, the permutation 45123867 has 4 blocks: 45, 123, 8, and 67.
Mirror image of A177264.

Examples

			T(4,2)=5 because we have 12-4-3, 2-1-34, 2-1-4-3, 2-4-1-3, and 2-4-3-1 (the blocks are separated by dashes).
Triangle starts:
     1;
     0,    2;
     1,    1,    4;
     4,    5,    5,   10;
    18,   22,   23,   23,   34;
    96,  114,  118,  119,  119,  154;
   600,  696,  714,  718,  719,  719,  874;
  4320, 4920, 5016, 5034, 5038, 5039, 5039, 5914;
		

Crossrefs

Programs

  • Magma
    A003422:= func< n | (&+[Factorial(j): j in [0..n-1]]) >;
    A177263:= func< n,k | k eq n select A003422(n) else Factorial(n-1) - Factorial(n-k-1) >;
    [A177263(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, May 19 2024
    
  • Maple
    T := proc (n, k) if k <= n-1 then factorial(n-1)-factorial(n-k-1) elif k = n then sum(factorial(j), j = 0 .. n-1) else 0 end if end proc: for n to 10 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
  • Mathematica
    A003422[n_]:= Sum[j!, {j,0,n-1}];
    T[n_, k_]:= If[k==n, A003422[n], (n-1)! -(n-k-1)!];
    Table[T[n,k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, May 19 2024 *)
  • SageMath
    def A003422(n): return sum(factorial(j) for j in range(n))
    def A177263(n,k): return A003422(n) if k==n else factorial(n-1) - factorial(n-k-1)
    flatten([[A177263(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, May 19 2024

Formula

T(n, k) = (n-1)! - (n-k-1)! if k <= n-1, otherwise T(n, n) = 0!+1!+...+(n-1)! = A003422(n).
T(n, 1) = A094304(n).
Sum_{k=1..n} T(n, k) = A000142(n) (row sums).
T(n, k) = A177264(n, n-k+1) (mirror image).
Showing 1-3 of 3 results.