The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063169 a(n) = n*A001865(n). 7

%I #69 Mar 03 2024 22:07:44

%S 1,6,51,568,7845,129456,2485567,54442368,1339822377,36602156800,

%T 1099126705611,35986038303744,1275815323139149,48693140873545728,

%U 1990581237014772375,86778247940387209216,4018626330009931930833,197009947951733259436032,10193206233792610863520867

%N a(n) = n*A001865(n).

%C Schenker sums without n-th term.

%C a(n)/n^n = Q(n) (called Ramanujan's function by Knuth).

%C Urn, n balls, with replacement: how many selections before a ball is chosen that was chosen already? Expected value is a(n)/n^n.

%C a(n) is the total number of recurrent elements over all endofunctions on n labeled points. a(n) = Sum_{k=1..n} A066324(n,k)*k. - _Geoffrey Critzer_, Dec 05 2011

%D D. E. Knuth, The Art of Computer Programming, 3rd ed. 1997, Vol. 1, Addison-Wesley, Reading, MA, 1.2.11.3 p. 116

%H Alois P. Heinz, <a href="/A063169/b063169.txt">Table of n, a(n) for n = 1..150</a>

%H Marijke van Gans, <a href="https://web.archive.org/web/20030420184243/http://www.silicon-alley.com/amp/cbi/seq/schenker.html">Schenker sums</a>

%H Don Zagier, <a href="https://www.youtube.com/watch?v=xVNjOoFNgxY">Partitions, Modular Forms and Moduli Spaces</a>, Youtube video of a lecture at Institut Henri Poincaré, Feb 28 2017.

%F a(n) = Sum_{k=0..n-1} n^k * n!/k!.

%F a(n)/n! = Sum_{k=0..n-1} n^k/k! (first n terms of e^n power series).

%F E.g.f.: T/(1-T)^2, where T=T(x) is Euler's tree function (see A000169) - _Len Smiley_, Nov 28 2001

%F E.g.f.: -LambertW(-x)/(1+LambertW(-x))^2. - _Alois P. Heinz_, Nov 16 2011

%F a(n) = A063170(n) - n^n.

%F a(n) = Sum_{k=1..n} C(n,k) * (n-k)^(n-k) * k^k. - _Paul D. Hanna_, Jul 04 2013

%F a(n) ~ n^(n+1/2)*sqrt(Pi/2). - _Vaclav Kotesovec_, Oct 05 2013

%F a(n) = Sum_{k=1..n} (n!/(n-k)!) * k^2 * n^(n-k-1). - _Brian P Hawkins_, Feb 07 2024

%e a(4) = (1*2*3*4) + 4*(2*3*4) + 4*4*(3*4) + 4*4*4*(4) = 568.

%t Flatten[Range[0, 20]! CoefficientList[Series[D[1/(1 - y t), y] /. y -> 1, {x, 0, 20}], {x, y}]]

%t (* Second program: *)

%t a[n_] := Exp[n]*Gamma[n+1, n] - n^n; Array[a, 19] (* _Jean-François Alcover_, Jan 25 2018 *)

%o (UBASIC)

%o 10 for N=1 to 42 : T=N^N : S=0

%o 20 for K=N to 1 step -1 : T/=N : T*=K : S+=T : next K

%o 30 print N,S : next N

%o (PARI) a(n)=sum(k=1,n,binomial(n,k)*n^(n-k)*k!) /* _Michael Somos_, Jun 09 2004 */

%o (PARI) a(n)=sum(k=1,n,binomial(n,k)*(n-k)^(n-k)*k^k) \\ _Paul D. Hanna_, Jul 04 2013

%o (PARI) a(n)=sum(k=0,n-1,n!/k!*n^k) \\ _Ruud H.G. van Tol_, Jan 14 2023

%o (Python)

%o from math import comb

%o def A063169(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 # _Chai Wah Wu_, Apr 25-26 2023

%Y Cf. A001865, A066324, A219706.

%K nonn,easy,nice

%O 1,2

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)