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

A119029 Numerator of Sum_{k=1..n} n^(k-1)/k!.

Original entry on oeis.org

1, 2, 4, 25, 217, 203, 6743, 69511, 1184417, 728102, 5720654791, 601499, 4670663321629, 42568060798, 888330615353, 15438515749903, 1676770323947695709, 30538296012677, 16858207434636875406943
Offset: 1

Views

Author

Alexander Adamchuk, Jul 22 2006

Keywords

Comments

Apparently, the three sequences T_1(n) = Sum_{k=1..n} n^(k-1)/k!, T_2(n) = Sum_{k=0..n} n^k/k!, and T_3(n) = Sum_{k=1..n} n^k/k!, with numerators in A119029, A120266, and A120267, respectively, have the same denominators, listed in A214401. This, however, is not immediately obvious. - Petros Hadjicostas, May 12 2020

Examples

			The first few fractions are 1, 2, 4, 25/3, 217/12, 203/5, 6743/72, 69511/315, 1184417/2240, 728102/567, ... = A119029/A214401. - _Petros Hadjicostas_, May 12 2020
		

Crossrefs

Programs

  • Mathematica
    Numerator[Table[Sum[n^(k-1)/k!,{k,1,n}],{n,1,30}]]

Formula

a(n) = numerator(Sum_{k=1..n} n^(k-1)/k!).
a(n) = A120267(n)/n.

A120267 Numerator of Sum_{k=1..n} n^k/k!.

Original entry on oeis.org

1, 4, 12, 100, 1085, 1218, 47201, 556088, 10659753, 7281020, 62927202701, 7217988, 60718623181177, 595952851172, 13324959230295, 247016251998448, 28505095507110827053, 549689328228186, 320305941258100632731917
Offset: 1

Views

Author

Alexander Adamchuk, Jun 30 2006

Keywords

Comments

n divides a(n) and a(n)/n = A119029(n). - Alexander Adamchuk, Oct 08 2006
Apparently, the three sequences T_1(n) = Sum_{k=1..n} n^(k-1)/k!, T_2(n) = Sum_{k=0..n} n^k/k!, and T_3(n) = Sum_{k=1..n} n^k/k!, with numerators in A119029, A120266, and A120267, respectively, have the same denominators, listed in A214401. This, however, is not immediately obvious. - Petros Hadjicostas, May 12 2020

Examples

			The first few fractions are 1, 4, 12, 100/3, 1085/12, 1218/5, 47201/72, 556088/315, 10659753/2240, 7281020/567, ... = A120267/A214401. - _Petros Hadjicostas_, May 12 2020
		

Crossrefs

Programs

  • Mathematica
    Numerator[Table[Sum[n^k/k!, {k,1,n}], {n,1,30}]]

Formula

a(n) = numerator(Sum_{k=1..n} n^k/k!).
a(n) = n*A119029(n). - Alexander Adamchuk, Oct 08 2006

Extensions

Various sections edited by Petros Hadjicostas, May 12 2020~

A214402 Cancellation factor in reducing Sum_{k=0...n} n^k/k! to lowest terms.

Original entry on oeis.org

1, 2, 6, 8, 10, 144, 70, 128, 162, 6400, 22, 6220800, 26, 100352, 182250, 425984, 170, 429981696, 38, 163840000, 13502538, 317194240, 46, 247669456896, 31250, 1417674752, 15943230, 80564191232, 9802, 25076532510720000000, 62, 10737418240, 38196790434, 1241245548544
Offset: 1

Views

Author

Jonathan Sondow, Jul 15 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n!/Denominator[Sum[n^k/k!, {k, 0, n}]], {n, 1, 30}]
  • PARI
    a(n) = n!/denominator(sum(k=0, n, n^k/k!)); \\ Michel Marcus, Apr 20 2021

Formula

a(n) = n!/A214401(n).

Extensions

More terms from Michel Marcus, Apr 20 2021

A214401 Denominator of Sum_{k=0..n} n^k/k!.

Original entry on oeis.org

1, 1, 1, 3, 12, 5, 72, 315, 2240, 567, 1814400, 77, 239500800, 868725, 7175168, 49116375, 2092278988800, 14889875, 3201186852864000, 14849255421, 3783802880000, 3543572316375, 562000363888803840000, 2505147019375, 496358721386591551488
Offset: 1

Views

Author

Jonathan Sondow, Jul 15 2012

Keywords

Comments

Apparently, the three sequences T_1(n) = Sum_{k=1..n} n^(k-1)/k!, T_2(n) = Sum_{k=0..n} n^k/k!, and T_3(n) = Sum_{k=1..n} n^k/k!, with numerators in A119029, A120266, and A120267, respectively, have the same denominators, listed in the current sequence. This, however, is not immediately obvious. - Petros Hadjicostas, May 12 2020

Crossrefs

Numerators are A120266.

Programs

  • Mathematica
    Denominator[Table[Sum[n^k/k!, {k, 0, n}], {n, 1, 30}]]
  • PARI
    a(n) = denominator(sum(k=0, n, n^k/k!)); \\ Michel Marcus, Apr 20 2021

Formula

a(n) = n!/A214402(n).

A129977 Numbers m such that A119029(m) = numerator(Sum_{k=1..m} m^(k-1)/k!) is prime.

Original entry on oeis.org

2, 17, 102, 112, 316, 447, 535, 820, 1396, 1475, 1650, 5575, 6486, 6832
Offset: 1

Views

Author

Alexander Adamchuk, Jun 13 2007

Keywords

Comments

For n >= 1, the corresponding primes are A119029(a(n)) = {2, 1676770323947695709, ...}.
a(15) > 10000. - Lucas A. Brown, Apr 01 2021

Crossrefs

Programs

  • Mathematica
    Do[ f=Numerator[ Sum[ n^(k-1)/k!, {k, 1, n} ] ]; If[ PrimeQ[f], Print[{n,f}] ], {n,1,316} ]
    Select[Range[2000],PrimeQ[Numerator[Sum[#^(k-1)/k!,{k,#}]]]&] (* Harvey P. Dale, Jun 15 2019 *)
  • PARI
    for( n=1,1000, if( ispseudoprime( numerator( sum( k=1,n,n^(k-1)/k!))), print1(n", "))) \\ M. F. Hasler, Jun 18 2007

Extensions

Edited and extended (a(6)..a(8)) by M. F. Hasler, Jun 18 2007
More terms from Ryan Propper, Jan 12 2008
Various sections edited by Petros Hadjicostas, May 12 2020
a(12)-a(14) from Lucas A. Brown, Apr 01 2021

A129976 Numbers k such that the numerator of Sum_{j=0..k} k^j/j! is a prime number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 14, 21, 33, 36, 56, 68, 94, 378, 1943, 2389, 2710, 5455, 6804
Offset: 1

Views

Author

Alexander Adamchuk, Jun 13 2007

Keywords

Comments

The corresponding primes are A120266(a(n)) = {2, 5, 13, 103, 1097, 1223, ...}
a(22) > 10^4. - Michael S. Branicky, Apr 27 2025

Examples

			Sum_{j=0..4} 4^j/j! = 103/3. The numerator is a prime, hence 4 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Do[ f=Numerator[Sum[n^k/k!,{k,0,n}]]; If[PrimeQ[f], Print[{n,f}]], {n, 1, 378}]

Extensions

Edited by Stefan Steinerberger, Jul 22 2007
a(17)-a(18) and a(20) from Ryan Propper, Jan 22 2008
a(19) and a(21) from Michael S. Branicky, Apr 26 2025
Showing 1-8 of 8 results.