login

Revision History for A291115

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of endofunctions on [n] such that the LCM of their cycle lengths equals nine.
(history; published version)
#17 by Joerg Arndt at Sat Apr 24 08:45:27 EDT 2021
STATUS

reviewed

approved

#16 by Michel Marcus at Sat Apr 24 06:09:39 EDT 2021
STATUS

proposed

reviewed

#15 by F. Chapoton at Sat Apr 24 04:33:00 EDT 2021
STATUS

editing

proposed

#14 by F. Chapoton at Sat Apr 24 04:32:53 EDT 2021
PROG

print map([a, (n) for n in range(26)]) # Indranil Ghosh, Aug 18 2017

STATUS

approved

editing

Discussion
Sat Apr 24
04:33
F. Chapoton: adapt py code to py3
#13 by N. J. A. Sloane at Sat Dec 07 12:33:53 EST 2019
PROG

print map(a, xrangerange(26)) # Indranil Ghosh, Aug 18 2017

Discussion
Sat Dec 07
12:33
OEIS Server: https://oeis.org/edit/global/2838
#12 by N. J. A. Sloane at Sat Dec 07 12:18:29 EST 2019
PROG

def b(n, m): return 0 if m>9 else (1 if m==9 else 0) if n==0 else sum([b(n - j, lcm(m, j))*binomial(n - 1, j - 1)*f(j - 1) for j in xrangerange(1, n + 1)])

def a(n): return sum([b(j, 1)*n**(n - j)*binomial(n - 1, j - 1) for j in xrangerange(n + 1)])

Discussion
Sat Dec 07
12:18
OEIS Server: https://oeis.org/edit/global/2837
#11 by N. J. A. Sloane at Fri Aug 18 18:26:12 EDT 2017
STATUS

proposed

approved

#10 by Indranil Ghosh at Fri Aug 18 15:21:27 EDT 2017
STATUS

editing

proposed

#9 by Indranil Ghosh at Fri Aug 18 15:20:42 EDT 2017
MATHEMATICA

Unprotect[Power]; Power[0|0., 0|0.]=1; Protect[Power]; b[n_, m_]:=b[n, m]=If[m>9, 0, If[n==0, If[m==9, 1, 0], Sum[b[n - j, LCM[m, j]] Binomial[n - 1, j - 1](j - 1)!, {j, n}]]]; Table[Sum[b[j, 1]*n^(n -j) Binomial[n - 1, j - 1], {j, 0, n}], {n, 0, 25}] (* Indranil Ghosh, Aug 18 2017 *)

PROG

(Python)

from sympy.core.cache import cacheit

from sympy import binomial, lcm, factorial as f

@cacheit

def b(n, m): return 0 if m>9 else (1 if m==9 else 0) if n==0 else sum([b(n - j, lcm(m, j))*binomial(n - 1, j - 1)*f(j - 1) for j in xrange(1, n + 1)])

def a(n): return sum([b(j, 1)*n**(n - j)*binomial(n - 1, j - 1) for j in xrange(n + 1)])

print map(a, xrange(26)) # Indranil Ghosh, Aug 18 2017

STATUS

approved

editing

#8 by Vaclav Kotesovec at Fri Aug 18 09:05:23 EDT 2017
STATUS

editing

approved