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

A055775 a(n) = floor(n^n / n!).

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 64, 163, 416, 1067, 2755, 7147, 18613, 48638, 127463, 334864, 881657, 2325750, 6145596, 16263866, 43099804, 114356611, 303761260, 807692034, 2149632061, 5726042115, 15264691107, 40722913454, 108713644516
Offset: 0

Views

Author

Henry Bottomley, Jul 12 2000

Keywords

Comments

Stirling's approximation for n! suggests that this should be about e^n/sqrt(pi*2n). Bill Gosper has noted that e^n/sqrt(pi*(2n+1/3)) is significantly better.
n^n/n! = A001142(n)/A001142(n-1), where A001142(n) is product{k=0 to n} C(n,k) (where C() is a binomial coefficient). - Leroy Quet, May 01 2004
There are n^n distinct functions from [n] to [n] or sequences on n symbols of length n, the number of those sequences having n distinct symbols is n!. So the probability P(n) of bijection is n!/n^n. The expected value of the number of functions that we pick until we found a bijection is the reciprocal of P(n), or n^n/n!. - Washington Bomfim, Mar 05 2012

Examples

			a(5)=26 since 5^5=3125, 5!=120, 3125/120=26.0416666...
		

Crossrefs

Programs

Formula

a(n) = floor(A000312(n)/A000142(n)).

Extensions

More terms from James Sellers, Jul 13 2000

A061711 a(n) = n^n * n!.

Original entry on oeis.org

1, 1, 8, 162, 6144, 375000, 33592320, 4150656720, 676457349120, 140587147048320, 36288000000000000, 11388728893445164800, 4270826380475341209600, 1886009588552176549862400, 968725766854884321342259200, 572622616354851562500000000000
Offset: 0

Views

Author

Lorenzo Fortunato (fortunat(AT)pd.infn.it), Jun 19 2001

Keywords

Comments

a(n) is the product of first n terms of an arithmetic progression with first term n and common difference n. E.g. a(3) = 3*6*9 = 162. - Amarnath Murthy, Sep 20 2003
Product of the entries in the last column of an n X n square array whose elements are the numbers 1..n^2 listed in increasing order by rows. - Wesley Ivan Hurt, Mar 31 2025

Examples

			a(1) = 1^1 * 1! = 1;
a(2) = 2^2 * 2! = 8;
a(3) = 3^3 * 3! = 162.
		

Crossrefs

Main diagonal of A131182.
Cf. A336765.

Programs

  • Magma
    [Factorial(n)*n^n: n in [0..30]]; // G. C. Greubel, Nov 29 2022
  • Mathematica
    Table[If[n == 0, 1, n^n] * n!, {n, 0, 20}] (* Vaclav Kotesovec, Mar 08 2018 *)
  • PARI
    a(n) = n!*n^n; \\ Harry J. Smith, Jul 26 2009
    
  • Python
    from math import factorial
    def A061711(n): return factorial(n)*n**n # Chai Wah Wu, Sep 03 2022
    

Formula

E.g.f.: sinh(n*x)^n. - Vaclav Kotesovec, Nov 05 2014
a(n) = [x^n] 1/(1 - n*x/(1 - n*x/(1 - 2*n*x/(1 - 2*n*x/(1 - 3*n*x/(1 - 3*n*x/(1 - ...))))))), a continued fraction. - Ilya Gutkovskiy, Sep 20 2017
Sum_{n>=1} 1/a(n) = A336765. - Amiram Eldar, Nov 20 2020
a(n) ~ exp(-n)*n^(2*n)*sqrt(2*n*Pi). - Peter Luschny, Jan 10 2022

A053042 a(n) = n^n + n!.

Original entry on oeis.org

2, 6, 33, 280, 3245, 47376, 828583, 16817536, 387783369, 10003628800, 285351587411, 8916579449856, 302881333613053, 11112094003849216, 437895198055227375, 18446764996499439616, 827240617573764860177, 39346414477670243303424
Offset: 1

Views

Author

N. J. A. Sloane, Feb 24 2000

Keywords

Crossrefs

Programs

Formula

E.g.f.: 1/(1 + LambertW(-x)) + 1/(1 - x), where LambertW() is the Lambert W-function. - Ilya Gutkovskiy, Jan 08 2017

A101030 Triangle read by rows: T(n,k) = number of functions from an n-element set into but not onto a k-element set.

Original entry on oeis.org

0, 0, 2, 0, 2, 21, 0, 2, 45, 232, 0, 2, 93, 784, 3005, 0, 2, 189, 2536, 13825, 45936, 0, 2, 381, 7984, 61325, 264816, 818503, 0, 2, 765, 24712, 264625, 1488096, 5623681, 16736896, 0, 2, 1533, 75664, 1119005, 8172576, 38025127, 132766208, 387057609, 0
Offset: 1

Views

Author

Clark Kimberling, Nov 26 2004

Keywords

Examples

			T(3,3) = #(functions into) - #(functions onto) = 3^3 - 6 = 21
Triangle T(n,k) begins:
  0,
  0, 2;
  0, 2,   21;
  0, 2,   45,   232;
  0, 2,   93,   784,    3005;
  0, 2,  189,  2536,   13825,   45936;
  0, 2,  381,  7984,   61325,  264816,   818503;
  0, 2,  765, 24712,  264625, 1488096,  5623681,  16736896;
  0, 2, 1533, 75664, 1119005, 8172576, 38025127, 132766208, 387057609;
		

Crossrefs

Cf. A199656, A036679 (diagonal).

Programs

  • Maple
    T:=(n, k)->sum((-1)^(j-1)*binomial(k, j)*(k-j)^n, j=1..k);
    seq(seq(T(n, k), k=1..n), n=1..15); # Dennis P. Walsh, Apr 13 2016

Formula

T(n,k) = A089072(n,k) - A019538(n,k).
T(n,k) = Sum_{j=1..k} (-1)^(j-1)*C(k,j)*(k-j)^n. - Dennis P. Walsh, Apr 13 2016
T(n,k) = k^n - k!*Stirling2(n,k). - Dennis P. Walsh, Apr 13 2016

Extensions

Offset corrected from 0 to 1 by Dennis P. Walsh, Apr 13 2016

A344112 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 functions.

Original entry on oeis.org

1, 3, 12, 7, 56, 485, 15, 240, 4015, 65280, 31, 992, 32525, 1047552, 33551307, 63, 4032, 261415, 16773120, 1073726199, 68719430080, 127, 16256, 2094965, 268419072, 34359660243, 4398046231168, 562949952597769, 255, 65280, 16770655, 4294901760, 1099511237151
Offset: 1

Views

Author

Mohammad K. Azarian, May 10 2021

Keywords

Examples

			T(2,2) = (number of relations) - (number of functions) = 2^4 - 4 = 12.
Triangle T(n,k) begins:
   1;
   3,  12;
   7,  56,   485;
  15, 240,  4015,   65280;
  31, 992, 32525, 1047552, 33551307;
		

Crossrefs

Programs

  • Mathematica
    Column[Table[2^(n*k) - k^n, {n, 10}, {k, n}], Center]

Formula

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

A344113 a(n) = 2^(n^2) - n^n.

Original entry on oeis.org

1, 12, 485, 65280, 33551307, 68719430080, 562949952597769, 18446744073692774400, 2417851639229257961991863, 1267650600228229401486703205376, 2658455991569831745807613835249018541, 22300745198530623141535718272639445405532160
Offset: 1

Views

Author

Mohammad K. Azarian, May 14 2021

Keywords

Comments

a(n) is the number of relations on a set with n elements that are not functions.

Examples

			a(1) = 2^(1^2) - 1^1 = 1.
a(2) = 2^(2^2) - 2^2 = 12.
a(3) = 2^(3^2) - 3^3 = 485.
		

Crossrefs

Programs

  • Mathematica
    Table[2^(n^2) - n^n, {n, 12}] // Flatten

A344114 a(n) = 2^(n^2) - n!.

Original entry on oeis.org

1, 14, 506, 65512, 33554312, 68719476016, 562949953416272, 18446744073709511296, 2417851639229258349049472, 1267650600228229401496699576576, 2658455991569831745807614120520772352, 22300745198530623141535718272648361026978816, 748288838313422294120286634350736906063831234982912
Offset: 1

Views

Author

Mohammad K. Azarian, Jun 04 2021

Keywords

Comments

a(n) is the number of relations on a set with n elements that are not one-to-one functions.

Examples

			a(1) = 2^(1^2) - 1! =   1;
a(2) = 2^(2^2) - 2! =  14;
a(3) = 2^(3^2) - 3! = 506.
		

Crossrefs

Programs

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

A162603 Primes of the form k^k - k! + 1.

Original entry on oeis.org

3, 233, 9996371201, 11111919647266817
Offset: 1

Views

Author

Keywords

Comments

The next term is too large to include.
The next term, a(5), has 527 digits and derives from n=224. - Harvey P. Dale, Jun 03 2014

Examples

			2^2-2!+1 = 4-2+1 = 3, 4^4-4!+1 = 256-24+1 = 233, ...
		

Crossrefs

Primes of the form A036679(k)+1.

Programs

  • Mathematica
    f[n_]:=n^n-n!+1; lst={};Do[p=f[n];If[PrimeQ[p],AppendTo[lst,p]],{n,2*5!}];lst
    Select[Table[n^n-n!+1,{n,30}],PrimeQ] (* Harvey P. Dale, Jun 03 2014 *)

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.

A057157 Number of non-invertible functions from {0,1}^n to {0,1}^n.

Original entry on oeis.org

0, 2, 232, 16736896, 18446723150919663616, 1461501637330639787366751139186115801643772542976
Offset: 0

Views

Author

Henry Bottomley, Aug 15 2000

Keywords

Crossrefs

Programs

  • Magma
    [(2^n)^(2^n)-Factorial(2^n): n in [0..5]]; // Vincenzo Librandi, Aug 22 2011
    
  • Mathematica
    Table[(2^n)^(2^n) - (2^n)!, {n,0,5}] (* G. C. Greubel, Nov 08 2018 *)
  • PARI
    vector(6,n,n--; (2^n)^(2^n) - (2^n)!) \\ G. C. Greubel, Nov 08 2018

Formula

a(n) = (2^n)^(2^n) - (2^n)! = A057156(n) - A000722(n) = A036679(A000079(n)).
Showing 1-10 of 20 results. Next