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-2 of 2 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

A350149 Triangle read by rows: T(n, k) = n^(n-k)*k!.

Original entry on oeis.org

1, 1, 1, 4, 2, 2, 27, 9, 6, 6, 256, 64, 32, 24, 24, 3125, 625, 250, 150, 120, 120, 46656, 7776, 2592, 1296, 864, 720, 720, 823543, 117649, 33614, 14406, 8232, 5880, 5040, 5040, 16777216, 2097152, 524288, 196608, 98304, 61440, 46080, 40320, 40320
Offset: 0

Views

Author

Robert B Fowler, Dec 27 2021

Keywords

Comments

T(n,k) are the denominators in a double summation power series for the definite integral of x^x. First expand x^x = exp(x*log(x)) = Sum_{n>=0} (x*log(x))^n/n!, then integrate each of the terms to get the double summation for F(x) = Integral_{t=0..x} t^t = Sum_{n>=1} (Sum_{k=0..n-1} (-1)^(n+k+1)*x^n*(log(x))^k/T(n,k)).
This is a definite integral, because lim {x->0} F(x) = 0.
The value of F(1) = 0.78343... = A083648 is known humorously as the Sophomore's Dream (see Borwein et al.).

Examples

			Triangle T(n,k) begins:
--------------------------------------------------------------------------
n/k         0        1       2       3      4      5      6      7      8
--------------------------------------------------------------------------
0  |        1,
1  |        1,       1,
2  |        4,       2,      2,
3  |       27,       9,      6,      6,
4  |      256,      64,     32,     24,    24,
5  |     3125,     625,    250,    150,   120,   120,
6  |    46656,    7776,   2592,   1296,   864,   720,   720,
7  |   823543,  117649,  33614,  14406,  8232,  5880,  5040,  5040,
8  | 16777216, 2097152, 524288, 196608, 98304, 61440, 46080, 40320, 40320.
...
		

References

  • Borwein, J., Bailey, D. and Girgensohn, R., Experimentation in Mathematics: Computational Paths to Discovery, A. K. Peters 2004.
  • William Dunham, The Calculus Gallery, Masterpieces from Newton to Lebesgue, Princeton University Press, Princeton NJ 2005.

Crossrefs

Cf. A000312 (first column), A000169 (2nd column), A003308 (3rd column excluding first term), A000142 (main diagonal), A000142 (2nd diagonal excluding first term), A112541 (row sums).
Values of the integral: A083648, A073009.

Programs

  • Magma
    A350149:= func< n,k | n^(n-k)*Factorial(k) >;
    [A350149(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 31 2022
    
  • Maple
    T := (n, k) -> n^(n - k)*k!:
    seq(seq(T(n, k), k = 0..n), n = 0..9); # Peter Luschny, Jan 07 2022
  • Mathematica
    T[n_, k_]:= n^(n-k)*k!; Table[T[n, k], {n, 0,12}, {k,0,n}]//Flatten (* Amiram Eldar, Dec 27 2021 *)
  • SageMath
    def A350149(n,k): return n^(n-k)*factorial(k)
    flatten([[A350149(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 31 2022

Formula

T(n, 0) = A000312(n).
T(n, 1) = A000169(n).
T(n, 2) = A003308(n), n >= 2.
Sum_{k=0..n} T(n, k) = A112541(n).
T(n, n) = A000142(n).
T(n, n-1) = A000142(n), n >= 1.
T(n,k) = A061711(n) * (n+1) / A350297(n+1,k). - Robert B Fowler, Jan 11 2022
Showing 1-2 of 2 results.