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-7 of 7 results.

A063170 Schenker sums with n-th term.

Original entry on oeis.org

1, 2, 10, 78, 824, 10970, 176112, 3309110, 71219584, 1727242866, 46602156800, 1384438376222, 44902138752000, 1578690429731402, 59805147699103744, 2428475127395631750, 105224992014096760832, 4845866591896268695010, 236356356027029797011456
Offset: 0

Views

Author

Marijke van Gans (marijke(AT)maxwellian.demon.co.uk)

Keywords

Comments

Urn, n balls, with replacement: how many selections if we stop after a ball is chosen that was chosen already? Expected value is a(n)/n^n.
Conjectures: The exponent in the power of 2 in the prime factorization of a(n) (its 2-adic valuation) equals 1 if n is odd and equals n - A000120(n) if n is even. - Gerald McGarvey, Nov 17 2007, Jun 29 2012
Amdeberhan, Callan, and Moll (2012) have proved McGarvey's conjectures. - Jonathan Sondow, Jul 16 2012
a(n), for n >= 1, is the number of colored labeled mappings from n points to themselves, where each component is one of two colors. - Steven Finch, Nov 28 2021

Examples

			a(4) = (1*2*3*4) + 4*(2*3*4) + 4*4*(3*4) + 4*4*4*(4) + 4*4*4*4.
G.f. = 1 + 2*x + 10*x^2 + 78*x^3 + 824*x^4 + 10970*x^5 + 176112*x^6 + ...
		

References

  • D. E. Knuth, The Art of Computer Programming, 3rd ed. 1997, Vol. 1, Addison-Wesley, p. 123, Exercise Section 1.2.11.3 18.

Crossrefs

Cf. A000312, A134095, A090878, A036505, A120266, A214402, A219546 (Schenker primes).

Programs

  • Maple
    seq(simplify(GAMMA(n+1,n)*exp(n)),n=0..20); # Vladeta Jovovic, Jul 21 2005
  • Mathematica
    a[n_] := Round[ Gamma[n+1, n]*Exp[n]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 16 2012, after Vladeta Jovovic *)
    a[ n_] := If[ n < 1, Boole[n == 0], n! Sum[ n^k / k!, {k, 0, n}]]; (* Michael Somos, Jun 05 2014 *)
    a[ n_] := If[ n < 0, 0, n! Normal[ Exp[x] + x O[x]^n] /. x -> n]; (* Michael Somos, Jun 05 2014 *)
  • PARI
    {a(n) = if( n<0, 0, n! * sum( k=0, n, n^k / k!))};
    
  • PARI
    {a(n) = sum( k=0, n, binomial(n, k) * k^k * (n - k)^(n - k))}; /* Michael Somos, Jun 09 2004 */
    
  • PARI
    for(n=0,17,print1(round(intnum(x=0,[oo,1],exp(-x)*(n+x)^n)),", ")) \\ Gerald McGarvey, Nov 17 2007
    
  • Python
    from math import comb
    def A063170(n): return (sum(comb(n,k)*(n-k)**(n-k)*k**k for k in range(1,(n+1>>1)))<<1) + (0 if n&1 else comb(n,m:=n>>1)*m**n) + (n**n<<1) if n else 1 # Chai Wah Wu, Apr 26 2023
  • UBASIC
    10 for N=1 to 42: T=N^N: S=T
    20 for K=N to 1 step -1: T/=N: T*=K: S+=T: next K
    30 print N,S: next N
    

Formula

a(n) = Sum_{k=0..n} n^k n!/k!.
a(n)/n! = Sum_{k=0..n} n^k/k!. (First n+1 terms of e^n power series.)
a(n) = A063169(n) + n^n.
E.g.f.: 1/(1-T)^2, where T=T(x) is Euler's tree function (see A000169).
E.g.f.: 1 / (1 - F), where F = F(x) is the e.g.f. of A003308. - Michael Somos, May 27 2012
a(n) = Sum_{k=0..n} binomial(n,k)*(n+k)^k*(-k)^(n-k). - Vladeta Jovovic, Oct 11 2007
Asymptotics of the coefficients: sqrt(Pi*n/2)*n^n. - N-E. Fahssi, Jan 25 2008
a(n) = A120266(n)*A214402(n) for n > 0. - Jonathan Sondow, Jul 16 2012
a(n) = Integral_{0..oo} exp(-x) * (n + x)^n dx. - Michael Somos, May 18 2004
a(n) = Integral_{0..oo} exp(-x)*(1+x/n)^n dx * n^n = A090878(n)/A036505(n-1) * n^n. - Gerald McGarvey, Nov 17 2007
EXP-CONV transform of A000312. - Tilman Neumann, Dec 13 2008
a(n) = n! * [x^n] exp(n*x)/(1 - x). - Ilya Gutkovskiy, Sep 23 2017
a(n) = (n+1)! - Sum_{k=0..n-1} binomial(n, k)*a(k)*(-k)^(n-k) for n > 0 with a(0) = 1 (see Max Alekseyev link). - Mikhail Kurkov, Jan 14 2025

A090878 Numerator of Integral_{x=0..infinity} exp(-x)*(1+x/n)^n dx.

Original entry on oeis.org

2, 5, 26, 103, 2194, 1223, 472730, 556403, 21323986, 7281587, 125858034202, 180451625, 121437725363954, 595953719897, 26649932810926, 3211211914492699, 285050975993898158530, 549689343118061, 640611888918574971191834
Offset: 1

Views

Author

Robert G. Wilson v, Feb 13 2004

Keywords

Comments

Also numerators of e_n(n) where e_n(x) is the exponential sum function exp_n(x) and where denominators are given by either A095996 (largest divisor of n! that is coprime to n) or A036503 (denominator of n^(n-2)/n!). - Gerald McGarvey, Nov 14 2005
a(n) is a multiple of A120266(n) or equals A120266(n), A120266(n) is numerator of Sum_{k=0..n} n^k/k!, the integral = (n-1)!/n^(n-1) * the Sum. - Gerald McGarvey, Apr 17 2008
The integral = (1/n^n)*A063170[n] (Schenker sums with n-th term, Integral_{x>0} exp(-x)*(n+x)^n dx). - Gerald McGarvey, Apr 17 2008
Expected value in the birthday paradox problem. Let X be a random variable that assigns to each f:{1,2,...,n+1}->{1,2,...,n} the smallest k in {2,3,...,n+1} such that f(k)=f(j) for some j < k. a(n)/A036505(offset=1) = E(X) the expected value of X. For n=365 E(X) is (surprising low) approximately 24. - Geoffrey Critzer, May 18 2013
Also numerator of Sum_{k=0..n} binomial(n,k)*(k/n)^k*((n-k)/n)^(n-k) [Prodinger]. N. J. A. Sloane, Jul 31 2013

Crossrefs

Denominators are in A036505.

Programs

  • Magma
    [Numerator((&+[Binomial(n,k)*(k/n)^k*((n-k)/n)^(n-k): k in [0..n]])): n in [1..20]]; // G. C. Greubel, Feb 08 2019
    
  • Mathematica
    f[n_]:= Integrate[E^(-x)*(1+x/n)^n, {x,0,Infinity}]; Table[Numerator[ f[n]], {n, 1, 20}]
    Table[Numerator[1 + Sum[If[k==0,1,Binomial[n,k]*(k/n)^k*((n-k)/n)^(n-k)], {k,0,n-1}]], {n,1,20}] (* G. C. Greubel, Feb 08 2019 *)
  • PARI
    vector(20, n, numerator(sum(k=0, n, binomial(n,k)*(k/n)^k*((n-k)/n)^(n-k)))) \\ G. C. Greubel, Feb 08 2019
    
  • Sage
    [numerator(sum(binomial(n,k)*(k/n)^k*((n-k)/n)^(n-k) for k in (0..n))) for n in (1..20)] # G. C. Greubel, Feb 08 2019

Formula

a(n) = A036505(n-1)*Sum_{k=0..n} (A128433(n)/A128434(n)). - Reinhard Zumkeller, Mar 03 2007

Extensions

Definition corrected by Gerald McGarvey, Apr 17 2008

A128433 Triangle, read by rows, T(n,k) = numerator of the maximum of the k-th Bernstein polynomial of degree n; denominator is A128434.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 27, 3, 27, 1, 1, 256, 216, 216, 256, 1, 1, 3125, 80, 5, 80, 3125, 1, 1, 46656, 37500, 34560, 34560, 37500, 46656, 1, 1, 823543, 5103, 590625, 35, 590625, 5103, 823543, 1, 1, 16777216, 13176688, 1792, 11200000, 11200000, 1792, 13176688, 16777216, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 03 2007

Keywords

Examples

			Triangle begins as:
  1;
  1,        1;
  1,        1,        1;
  1,        4,        4,      1;
  1,       27,        3,     27,        1;
  1,      256,      216,    216,      256,        1;
  1,     3125,       80,      5,       80,     3125,     1;
  1,    46656,    37500,  34560,    34560,    37500, 46656,        1;
  1,   823543,     5103, 590625,       35,   590625,  5103,   823543,        1;
  1, 16777216, 13176688,   1792, 11200000, 11200000,  1792, 13176688, 16777216, 1;
		

Crossrefs

Programs

  • Mathematica
    B[n_, k_]:= If[k==0 || k==n, 1, Binomial[n, k]*k^k*(n-k)^(n-k)/n^n];
    T[n_, k_]= Numerator[B[n, k]];
    Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 19 2021 *)
  • Sage
    def B(n,k): return 1 if (k==0 or k==n) else binomial(n, k)*k^k*(n-k)^(n-k)/n^n
    def T(n,k): return numerator(B(n,k))
    flatten([[T(n,k) for k in (0..n)] for n in (0..10)]) # G. C. Greubel, Jul 19 2021

Formula

T(n,k)/A128434(n,k) = Binomial(n,k) * k^k * (n-k)^(n-k) / n^n.
For n>0: Sum_{k=0..n} T(n,k)/A128434(n,k) = A090878(n)/A036505(n-1).
T(n,n-k) = T(n,k).
T(n,0) = 1.
for n>0: T(n,1)/A128434(n,1) = A000312(n-1)/A000169(n).

A128434 Triangle, read by rows, T(n,k) = denominator of the maximum of the k-th Bernstein polynomial of degree n; numerator is A128433.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 9, 9, 1, 1, 64, 8, 64, 1, 1, 625, 625, 625, 625, 1, 1, 7776, 243, 16, 243, 7776, 1, 1, 117649, 117649, 117649, 117649, 117649, 117649, 1, 1, 2097152, 16384, 2097152, 128, 2097152, 16384, 2097152, 1, 1, 43046721, 43046721, 6561, 43046721, 43046721, 6561, 43046721, 43046721, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 03 2007

Keywords

Examples

			Triangle begins as:
  1;
  1,       1;
  1,       2,      1;
  1,       9,      9,       1;
  1,      64,      8,      64,      1;
  1,     625,    625,     625,    625,       1;
  1,    7776     243,      16,    243,    7776,      1;
  1,  117649, 117649,  117649, 117649,  117649, 117649,       1;
  1, 2097152,  16384, 2097152,    128, 2097152,  16384, 2097152, 1;
		

Crossrefs

Programs

  • Mathematica
    B[n_, k_]:= If[k==0 || k==n, 1, Binomial[n, k]*k^k*(n-k)^(n-k)/n^n];
    T[n_, k_]= Denominator[B[n, k]];
    Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 19 2021 *)
  • Sage
    def B(n,k): return 1 if (k==0 or k==n) else binomial(n, k)*k^k*(n-k)^(n-k)/n^n
    def T(n,k): return denominator(B(n,k))
    flatten([[T(n,k) for k in (0..n)] for n in (0..10)]) # G. C. Greubel, Jul 19 2021

Formula

A128433(n,k)/T(n,k) = binomial(n,k) * k^k * (n-k)^(n-k) / n^n.
For n>0: Sum_{k=0..n} A128433(n,k)/T(n,k) = A090878(n)/A036505(n-1);
T(n, n-k) = T(n,k).
T(n, 0) = T(n, n) = 1.
for n>0: A128433(n,1)/T(n,1) = A000312(n-1)/A000169(n).

A264234 Numerators of the coefficients in the expansion of 1/W(x) - 1/x where W(x) is the Lambert W function.

Original entry on oeis.org

1, -1, 2, -9, 32, -625, 324, -117649, 131072, -4782969, 1562500, -25937424601, 35831808, -23298085122481, 110730297608, -4805419921875, 562949953421312, -48661191875666868481, 91507169819844, -104127350297911241532841, 640000000000000000, -865405750887126927009
Offset: 0

Views

Author

Peter Luschny, Nov 09 2015

Keywords

Comments

If prefixed by an additional 1, numerators of coefficients of expansion of exp(W(x)). - N. J. A. Sloane, Jan 08 2021

Examples

			Coefficients of expansion of exp(W(x)) are 1, 1, -1/2, 2/3, -9/8, 32/15, -625/144, 324/35, -117649/5760, 131072/2835, -4782969/44800, ... - _N. J. A. Sloane_, Jan 08 2021
		

Crossrefs

Denominators in A264235.
Cf. A036505.

Programs

  • Magma
    [(-1)^n * Numerator(n^n/Factorial(n)): n in [0..50]]; // G. C. Greubel, Nov 14 2017
  • Maple
    seq(numer((-1)^n*n^n/n!), n = 0..21);
  • Mathematica
    CoefficientList[Series[1/ProductLog[x] - 1/x, {x, 0, 21}], x] // Numerator
  • PARI
    vector(22, n, n--; (-1)^n*numerator(n^n/n!)) \\ Altug Alkan, Nov 09 2015
    

Formula

a(n) = (-1)^n*numerator(g(n)) where g(n) = n^n/n!.
a(n) = (-1)^n*denominator(h(n)) where h(n) = Sum_{k=0..n-1}(n!*n^k)/(k!*n^n).

A226931 Numerator of n + Sum(binomial(n,k)*(k/n)^k*((n-k)/n)^(n-k), k=0..n).

Original entry on oeis.org

3, 9, 53, 231, 5319, 3167, 1296273, 1604979, 64370707, 22906587, 411169704813, 610433321, 424312831956207, 2146177886409, 98731231639051, 12218411169233691, 1112291237880234922707, 2196818399875253, 2619031544578888560315813, 16827894135040576041
Offset: 1

Views

Author

N. J. A. Sloane, Jul 31 2013

Keywords

Examples

			3, 9/2, 53/9, 231/32, 5319/625, 3167/324, 1296273/117649, 1604979/131072, ...
		

Crossrefs

Denominators are in A036505. Cf. A090878, A063170.

Programs

  • PARI
    a(n) = numerator(n + sum(k=0, n, binomial(n,k)*(k/n)^k*((n-k)/n)^(n-k))); \\ Michel Marcus, Jun 11 2015

A227866 Derived from von Mangoldt matrix sequence.

Original entry on oeis.org

1, 1, 4, 27, 64, 3125, 288, 823543, 147456, 4251528, 460800, 285311670611, 111974400, 302875106592253, 3251404800, 13436928000, 106542032486400, 827240261886336764177, 1053455155200000, 1978419655660313589123979, 102395841085440000
Offset: 0

Views

Author

Mats Granvik, Nov 02 2013

Keywords

Comments

Since the logarithm of n is given by the limit of Zeta(s)*Sum_{k=1..n} ((1 - (If k mod n = 0 then n else 0))/k^(s - 1)) as s -> 1, it is natural to ask what the von Mangoldt function variant might look like starting from the table A191898, instead of table A167407. - Mats Granvik, Nov 11 2013

Crossrefs

Programs

  • Mathematica
    Clear[nn, t, n, k, i, s]; nn = 20; t[n_, 1] = 1; t[1, k_] = 1; t[n_, k_] := t[n, k] = If[n >= k, -Sum[t[n - i, k], {i, 1, k - 1}], -Sum[t[k - i, n], {i, 1, n - 1}]]; Exp[Table[Limit[Zeta[s]*Sum[If[n == 1, 0, t[n, k]]/k^(s - 1), {k, 1, n}], s -> 1], {n, 0, nn}]]*(Range[nn + 1] - 1)!

Formula

a(prime(n)) = A000312(prime(n)).
Showing 1-7 of 7 results.