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 11-20 of 26 results. Next

A075363 Triangle read by rows, in which n-th row gives n smallest powers of n.

Original entry on oeis.org

1, 2, 4, 3, 9, 27, 4, 16, 64, 256, 5, 25, 125, 625, 3125, 6, 36, 216, 1296, 7776, 46656, 7, 49, 343, 2401, 16807, 117649, 823543, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, 9, 81, 729, 6561, 59049, 531441, 4782969, 43046721, 387420489, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Comments

T(n,k) is the number of sequences with repetition (k-tuples) of k (not necessarily different) elements taken from an n-set S. These sequences are also called "words of length k over the alphabet S". For sequences without repetition (partial permutations) cf. A068424. - Manfred Boergens, Jun 18 2023

Examples

			From _Felix Fröhlich_, Sep 15 2019: (Start)
Triangle begins:
   1;
   2,   4;
   3,   9,   27;
   4,  16,   64,   256;
   5,  25,  125,   625,   3125;
   6,  36,  216,  1296,   7776,   46656;
   7,  49,  343,  2401,  16807,  117649,  823543;
   8,  64,  512,  4096,  32768,  262144, 2097152, 16777216;
   9,  81,  729,  6561,  59049,  531441, 4782969, 43046721, 387420489; (End)
		

Crossrefs

T(n, 1) = A000027(n), T(n, n) = A000312(n). Cf. A090414.

Programs

  • Mathematica
    Array[#^Range[#] &, 10] (* Paolo Xausa, Jun 09 2025 *)
  • PARI
    row(n) = for(k=1, n, print1(n^k, ", "))
    trianglerows(n) = for(x=1, n, row(x); print(""))
    /* Print initial 10 rows as follows: */
    trianglerows(10) \\ Felix Fröhlich, Sep 15 2019
    
  • Python
    from math import isqrt, comb
    def A075363(n): return (isqrt(n<<3)+1>>1)**(n-comb((m:=isqrt(k:=n<<1))+(k>m*(m+1)),2)) # Chai Wah Wu, Jun 08 2025

Formula

T(n, k) = n^k, 1<=k<=n.
a(n) = A002024(n)^A002260(n). [Gerald Hillier, Feb 12 2009]

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
More terms from Michel Marcus, Sep 15 2019

A068943 a(n) = f(n, n, n), where f is the generalized super falling factorial (see comments for definition.).

Original entry on oeis.org

1, 2, 24, 331776, 2524286414780230533120, 18356962141505758798331790171539976807981714702571497465907439808868887035904000000
Offset: 1

Views

Author

Francois Jooste (phukraut(AT)hotmail.com), Mar 09 2002

Keywords

Comments

f(x, p, r) = Product_{m = 1..p} (x-m+1)^binomial(m+r-2, m-1), for x > 0, x >= p >= 0, r > 0. f is a generalization of both the multi-level factorial A066121(n, k) and the falling factorial A068424(x, n). f(n, n, 1) = n! and f(n, n, 2) = the superfactorial A000178(n). In general f(n, n, r) = A066121(n+r, r+1). f(x, p, 1) = A068424(x, p) and f(x, p, r+1) = Product_{i = 0..p-1} f(x-i, p-i, r).
a(8) has 1213 digits. - Michael S. Branicky, Apr 09 2023

Examples

			a(3) = 24 since (4-1)^binomial(1+3-2,1-1) * (4-2)^binomial(2+3-2,2-1) * (4-3)^binomial(3+3-2,3-1) = 3^1 * 2^3 * 1 = 24.
		

Programs

  • Maple
    f := (x,p,r)->`if`(r<>0,`if`(p>0,product((x-m+1)^binomial(m+r-2,m-1),m=1..p),1),x); f(n,n,n);
  • PARI
    a(n)=prod(m=1,n, (n-m+1)^binomial(m+n-2,m-1)) \\ Charles R Greathouse IV, Oct 30 2021
    
  • Python
    from math import comb, prod
    def a(n): return prod((n-m+1)**comb(m+n-2, m-1) for m in range(1, n+1))
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Apr 09 2023

Formula

a(n) = Product_{m = 1..n} (n-m+1)^binomial(m+n-2, m-1).

Extensions

Edited by David Wasserman, Mar 14 2003

A105725 Triangle read by rows: T(n,k)=(n+k)!/k! (0<=k<=n-1; n>=1).

Original entry on oeis.org

1, 2, 6, 6, 24, 60, 24, 120, 360, 840, 120, 720, 2520, 6720, 15120, 720, 5040, 20160, 60480, 151200, 332640, 5040, 40320, 181440, 604800, 1663200, 3991680, 8648640, 40320, 362880, 1814400, 6652800, 19958400, 51891840, 121080960, 259459200
Offset: 1

Views

Author

Amarnath Murthy, Apr 18 2005

Keywords

Comments

T(n,n-1)=(2n-1)!/(n-1)! (A000407); T(n,0)=n! (A000142); Row sums yield A092956; Arithmetic means of the rows yield A001761.
Has many diagonals in common with A068424. - Zerinvary Lajos, Apr 14 2006

Examples

			1
2 6
6 24 60
24 120 360 840
120 720 2520 6720 15120
720 5040 20160 60480 151200 332640
5040 40320 181440 604800 1663200 3991680 8648640
40320 362880 1814400 6652800 19958400 51891840 121080960 259459200
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if k
    				

Formula

T(n, k)=(n+k)!/k! (0<=k<=n-1; n>=1).

Extensions

More terms from Emeric Deutsch, Apr 18 2005

A344115 Triangle read by rows: T(n,k) is the number of relations from an n-element set to a k-element set that are not one-to-one functions.

Original entry on oeis.org

1, 2, 14, 5, 58, 506, 12, 244, 4072, 65512, 27, 1004, 32708, 1048456, 33554312, 58, 4066, 262024, 16776856, 1073741104, 68719476016, 121, 16342, 2096942, 268434616, 34359735848, 4398046506064, 562949953416272, 248, 65480, 16776880, 4294965616, 1099511621056
Offset: 1

Views

Author

Mohammad K. Azarian, Jun 06 2021

Keywords

Comments

If n=k, then T(n,k) = 2^(n^2) - n!, which is A344114, and if kA344110.

Examples

			For T(2,2): the number of relations is 2^4 and the number of one-to-one functions is 2, so 2^4 - 2 = 14 and thus T(2,2) = 14.
Triangle T(n,k) begins:
   1;
   2,   14;
   5,   58,   506;
  12,  244,  4072,   65512;
  27, 1004, 32708, 1048456, 33554312;
		

Crossrefs

Programs

  • Mathematica
    Table[2^(n*k) - k!/(k - n)!, {k, 10}, {n, k}] // Flatten

Formula

T(n,k) = 2^(n*k) - k!/(k-n)!, k >= n.

A089503 Triangle of numbers used for basis change between certain falling factorials.

Original entry on oeis.org

1, 1, 4, 1, 12, 30, 1, 24, 168, 336, 1, 40, 540, 2880, 5040, 1, 60, 1320, 13200, 59400, 95040, 1, 84, 2730, 43680, 360360, 1441440, 2162160, 1, 112, 5040, 117600, 1528800, 11007360, 40360320, 57657600, 1, 144, 8568, 274176, 5140800, 57576960
Offset: 1

Views

Author

Wolfdieter Lang, Dec 01 2003

Keywords

Comments

Used to relate array A078739 ((2,2)-Stirling2) to triangle A071951 (Legendre-Stirling).

Examples

			The triangle begins:
n\m 1   2    3      4       5        6        7        8 ...
1:  1
2:  1   4
3:  1  12   30
4:  1  24  168    336
5:  1  40  540   2880    5040
6:  1  60 1320  13200   59400    95040
7:  1  84 2730  43680  360360  1441440  2162160
8:  1 112 5040 117600 1528800 11007360 40360320 57657600
...
Row 9:  1 144 8568 274176 5140800 57576960 374250240 1283143680 1764322560
Row 10: 1 180 13680 574560 14651280 234420480 2344204800 14065228800 45711993600 60949324800.
Reformatted - _Wolfdieter Lang_, Apr 10 2013
n=3: fallfac(x+2,6) = 1*fallfac(x,6) + 12*fallfac(x,5) + 30*fallfac(x,4).
		

Programs

  • Mathematica
    eq[n_, x_] := Sum[FactorialPower[x, 1 - m + 2*n]*a[n, m], {m, 1, n}] == FactorialPower[x + n - 1, 2*n]; eq[n_] := Table[eq[n, x], {x, n + 1, 2*n}]; row[n_] := First[Table[a[n, m], {m, 1, n}] /. Solve[eq[n]]]; Array[row, 10] // Flatten (* Jean-François Alcover, Sep 02 2016 *)
    a[n_,m_]:= Binomial[n-1,m-1]*Binomial[2n,m-1]*Gamma[m]; Table[a[n,m],{n,1,10},{m,1,n}] (* Stefano Negro, Nov 10 2021 *)

Formula

fallfac(x+n-1, 2*n) = Sum_{m=1..n} a(n, m)*fallfac(x, 2*n-(m-1)), n>=1 where fallfac(x, k) := Product_{j=1..k} (x+1-j), with fallfac(n, k) = A068424(n, k) (falling factorials). a(n, m) = 0 if n < m.
T(n, m) = binomial(n-1, m-1)*binomial(2n, m-1)*m!, for 1 <= m <= n, with binomial(n, m) = A007318. - Stefano Negro, Nov 10 2021

A188066 Triangle read by rows: Bell polynomial of the second kind B(n,k) with argument vector (7, 42, 210, 840, 2520, 5040, 5040).

Original entry on oeis.org

7, 42, 49, 210, 882, 343, 840, 11172, 12348, 2401, 2520, 117600, 288120, 144060, 16807, 5040, 1076040, 5433120, 5330220, 1512630, 117649, 5040, 8643600, 89029080, 155296680, 81177810, 14823774, 823543, 0, 60540480, 1306912320, 3884433840, 3360055440, 1087076760, 138355224, 5764801
Offset: 1

Views

Author

Vladimir Kruchinin, Mar 24 2011

Keywords

Comments

From the explicit write-up of the Bell polynomials we have B(n,k)(7*x^6, 42*x^5, 210*x^4, 840*x^3, 2520*x^2, 5040*x, 5040) = B(n,k)(7, 42, ..., 5040)*x^(7*k-n) for a more general set of arguments.

Examples

			Triangle begins
     7;
    42,      49;
   210,     882,     343;
   840,   11172,   12348,    2401;
  2520,  117600,  288120,  144060,   16807;
  5040, 1076040, 5433120, 5330220, 1512630, 117649;
  ...
		

Crossrefs

Cf. A188062, A068424 (row 7).

Programs

  • Maple
    A188066 := proc(n,k) n!/k!*add( binomial(k,j)*binomial(7*j,n)*(-1)^(k-j),j=0..k) ; end proc:
    seq(seq(A188066(n,k),k=1..n),n=1..5) ; # R. J. Mathar, Apr 08 2011
    # The function BellMatrix is defined in A264428.
    # Adds (1,0,0,0, ..) as column 0.
    BellMatrix(n -> `if`(n<7,[7,42,210,840,2520,5040,5040][n+1],0), 9); # Peter Luschny, Jan 29 2016
  • Mathematica
    b[n_, k_] := n!/k!*Sum[ Binomial[k, j]*Binomial[7*j, n]*(-1)^(k - j), {j, 0, k}]; Table[b[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 21 2013, translated from Maxima *)
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 12;
    B = BellMatrix[Function[n, If[n<7, {7, 42, 210, 840, 2520, 5040, 5040}[[n + 1]], 0]], rows];
    Table[B[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)
  • Maxima
    B(n,k):=n!/k!*x^(7*k-n)*sum(binomial(k,j)*binomial(7*j,n)*(-1)^(k-j),j,0,k);

Formula

B(n,k) = (n!/k!)*Sum_{j=0..k} binomial(k,j)*binomial(7*j,n)*(-1)^(k-j).

A330858 Triangle read by rows: T(n,k) is the number of permutations in S_n for which all cycles have length <= k.

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 1, 10, 18, 24, 1, 26, 66, 96, 120, 1, 76, 276, 456, 600, 720, 1, 232, 1212, 2472, 3480, 4320, 5040, 1, 764, 5916, 14736, 22800, 29520, 35280, 40320, 1, 2620, 31068, 92304, 164880, 225360, 277200, 322560, 362880, 1, 9496, 171576, 632736
Offset: 1

Views

Author

Peter Kagey, Apr 28 2020

Keywords

Examples

			For n = 3 and k = 2, the T(3,2) = 4 permutations in S_3 where all cycle lengths are less than or equal to 2 are:
(1)(2)(3), (12)(3), (13)(2), and (1)(23).
Table begins:
n\k| 1    2     3     4      5      6      7      8      9
---+------------------------------------------------------
  1| 1
  2| 1    2
  3| 1    4     6
  4| 1   10    18    24
  5| 1   26    66    96    120
  6| 1   76   276   456    600    720
  7| 1  232  1212  2472   3480   4320   5040
  8| 1  764  5916 14736  22800  29520  35280  40320
  9| 1 2620 31068 92304 164880 225360 277200 322560 362880
		

Crossrefs

T(n,floor(n/2)) gives A024168.
Cf. A126074.

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = If[n <= k, n!, n*T[n-1, k] - FactorialPower[n-1, k]* T[n-k-1, k]];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 28 2020 *)
  • PARI
    T4(n, k)=if(k<1 || k>n, 0, n!/(n-k)!); \\ A068424
    T(n,k) = if (n<=k, n!, n*T(n-1,k) - T4(n-1,k)*T(n-k-1,k));
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n,k), ", ")); print); \\ Michel Marcus, May 09 2020

Formula

T(n,k) = n! if n <= k, otherwise T(n,k) = n*T(n-1,k) - A068424(n-1,k)*T(n-k-1,k).
T(n,k) = Sum_{j=1..k} A126074(n,j). - Alois P. Heinz, Jul 08 2022

A333726 Triangle read by rows: T(n,k) is the number of permutations in S_n for which all cycles are length k or greater.

Original entry on oeis.org

1, 2, 1, 6, 2, 2, 24, 9, 6, 6, 120, 44, 24, 24, 24, 720, 265, 160, 120, 120, 120, 5040, 1854, 1140, 720, 720, 720, 720, 40320, 14833, 8988, 6300, 5040, 5040, 5040, 5040, 362880, 133496, 80864, 58464, 40320, 40320, 40320, 40320, 40320
Offset: 1

Views

Author

Peter Kagey, Apr 23 2020

Keywords

Examples

			Triangle begins:
n\k|      1      2     3     4     5     6     7     8     9
---+--------------------------------------------------------
  1|      1
  2|      2      1
  3|      6      2     2
  4|     24      9     6     6
  5|    120     44    24    24    24
  6|    720    265   160   120   120   120
  7|   5040   1854  1140   720   720   720   720
  8|  40320  14833  8988  6300  5040  5040  5040  5040
  9| 362880 133496 80864 58464 40320 40320 40320 40320 40320
		

Crossrefs

Columns 1-4: A000142, A000166, A038205, A047865.
Cf. A068424.

Formula

T(n,k) = 0 when n < k,
T(n,k) = (n-1)! when n = k, and otherwise
T(n,k) = (n-1) * T(n-1, k) + A068424(n-1, k-1) * T(n-k, k).

A381706 Three-dimensional array of the number b(n, k, i) of permutations of k chosen numbers in {1,2,...,n} with i-1 descents, n >= 1, 1 <= k <= n, 1 <= i <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 4, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 11, 11, 1, 1, 11, 11, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 1, 1, 16, 26, 16, 1, 1, 26, 66, 26, 1, 1, 26, 66, 26, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 1, 1, 22, 37, 37, 22, 1, 1, 42, 137, 137, 42, 1
Offset: 1

Views

Author

Timothy Y. Chow, Mar 04 2025

Keywords

Comments

For n >= 1, 0 <= k <= n-2, and 0 <= i <= n-1, b(n+1, k+1, i+1) is the (2i)th Betti number of the prepermutohedral variety X_k obtained by k iterated blowups of projective space P^n.

Examples

			For n = 4 and k = 2, there are 12 permutations of 2 chosen numbers in {1,2,3,4}; the number of descents is defined to be the number of descents in the permutation of the chosen numbers, plus the number of non-chosen numbers greater than the first chosen number. For example, 32 has 2 descents because 3 is greater than 2 and 4 (a non-chosen number) is greater than 3. The four other permutations of 2 chosen numbers with 2 descents are 31, 12, 13, 14.
The sequence is most naturally viewed as a sequence of squares of size 1x1, 2x2, 3x3, 4x4, etc.
  1               [E(1)]
  1  1
  1  1            [E(2)]
  1  1  1
  1  4  1
  1  4  1         [E(3)]
  1  1  1  1
  1  5  5  1
  1 11 11  1
  1 11 11  1      [E(4)]
  1  1  1  1  1
  1  6  6  6  1
  1 16 26 16  1
  1 26 66 26  1
  1 26 66 26  1   [E(5)]
  ...
[E(n)] refers to row n of A008292.
		

Crossrefs

Programs

  • Maple
    beta := proc(n, k)
       local b, p, plist, descents, s, i, r, R:
       r := 1..n; R := {`$`(r)};
       b := Array(r, fill=0);
       plist := combinat:-permute(n, k):
       for p in plist do
          descents := 1:
          s := R minus {op(p)}:
          for i in s do
             if i > p[1] then descents := descents + 1 end if:
          end do:
          for i to k-1 do
             if p[i] > p[i+1] then descents := descents + 1 end if:
          end do:
          b[descents] := b[descents] + 1:
       end do:
       return b
    end proc:
    for n from 1 to 5 do seq(beta(n, k), k = 1..n) end do;
    # After Max Alekseyev's PARI program:
    b := (n, k, i) -> local p, t, j; add(add(binomial(n - p, t) * binomial(p - 1, n - k - t) * add(binomial(k, j)*(-1)^j*(i - t - j)^(n - t - p) * (i - 1 - t - j)^(k - n - 1 + t + p), j = 0..i-1-t), t = n+1-k-p..i-1), p = 1..n): seq(seq(seq(b(n, k, j), j = 1..n), k = 1..n), n = 1..6);  # Peter Luschny, Mar 15 2025
  • PARI
    { b(n,k,i) = sum(p=1, n, sum(t=n+1-k-p,i-1, my(l=n+1-t-p); binomial(n-p,t) * binomial(p-1,n-k-t) * sum(j=0,i-1-t, binomial(k,j) * (-1)^j * (i-t-j)^(l-1) * (i-1-t-j)^(k-l) )) ); } \\ Max Alekseyev, Mar 14 2025
  • SageMath
    def beta(n: int, k: int) -> list[int]:
        b = [0]*n
        for p in Permutations(n, k):
            descents = sum(int(not i in p and i > p[0]) for i in (1..n))
            descents += sum(int(p[i-1] > p[i]) for i in (1..k-1))
            b[descents] += 1
        return b
    def Trow(n) -> list[int]: return flatten([beta(n, k) for k in (1..n)])
    for n in (1..6): print(f"{n}: ", Trow(n))  # Peter Luschny, Mar 11 2025
    

Formula

Explicit formula for b(n, k, i) is given in MO link and PARI code below. - Max Alekseyev, Mar 14 2025
The recurrence b(n,k,i) = b(n,k-1,i) + (n choose k) Sum_{i=d-n+k}^{d-1} b(k-1,k-2,j) was conjectured by Ron Fertig and proved by Alex R. Miller.
b(n, n, k) equals the Eulerian number T(n, k) of A008292.
If n > 1 then b(n, n-1, k) also equals the Eulerian number T(n, k) of A008292.
Sum_{i} b(n, k, i) equals the falling factorial A068424.
Empirically, Sum_{k} b(n, k, i) seems to equal A381888.

A345405 Integers k such that k = (d1)_c + (d2)_c + ... + (dc)_c, where (d)_c denotes the descending factorial of d, c is the length of k and di is the i-th digit of k in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 36, 86, 15960
Offset: 1

Views

Author

Andrzej Kukla, Jun 18 2021

Keywords

Comments

The descending factorial (d)_c is defined as d*(d-1)*(d-2)*...*(d-c+1).

Examples

			(8)_2 + (6)_2 = 8*7 + 6*5 = 56 + 30 = 86, therefore 86 is in the list.
		

Crossrefs

Cf. A014080 (factorions), A068424 (descending factorials), A345406.

Programs

  • Mathematica
    q[n_] := Module[{dig = IntegerDigits[n], nd}, nd = Length[dig]; Sum[d!/(d - nd)!, {d, dig}] == n]; Select[Range[0, 16000], q] (* Amiram Eldar, Jun 18 2021 *)
Previous Showing 11-20 of 26 results. Next