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.

A291116 Number of endofunctions on [n] such that the LCM of their cycle lengths equals ten.

This page as a plain text file.
%I A291116 #17 Apr 24 2021 08:45:31
%S A291116 0,0,0,0,0,0,0,504,32256,1460592,59814720,2403157680,98055619200,
%T A291116 4129943329512,180976836968928,8281570545448200,396324506640142080,
%U A291116 19840151844921504096,1038497761573246945152,56790713866712335971552,3241264004352759793685760
%N A291116 Number of endofunctions on [n] such that the LCM of their cycle lengths equals ten.
%H A291116 Alois P. Heinz, <a href="/A291116/b291116.txt">Table of n, a(n) for n = 0..387</a>
%F A291116 a(n) ~ (exp(1) - 2*exp(3/2) - 2*exp(6/5) + 4*exp(9/5)) * n^(n-1). - _Vaclav Kotesovec_, Aug 18 2017
%p A291116 b:= proc(n, m) option remember; (k-> `if`(m>k, 0,
%p A291116       `if`(n=0, `if`(m=k, 1, 0), add(b(n-j, ilcm(m, j))
%p A291116        *binomial(n-1, j-1)*(j-1)!, j=1..n))))(10)
%p A291116     end:
%p A291116 a:= n-> add(b(j, 1)*n^(n-j)*binomial(n-1, j-1), j=0..n):
%p A291116 seq(a(n), n=0..22);
%t A291116 Unprotect[Power]; Power[0|0., 0|0.]=1; Protect[Power];b[n_, m_]:=b[n, m]=If[m>10, 0, If[n==0, If[m==10,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 *)
%o A291116 (Python)
%o A291116 from sympy.core.cache import cacheit
%o A291116 from sympy import binomial, lcm, factorial as f
%o A291116 @cacheit
%o A291116 def b(n, m): return 0 if m>10 else (1 if m==10 else 0) if n==0 else sum([b(n - j, lcm(m, j))*binomial(n - 1, j - 1)*f(j - 1) for j in range(1, n + 1)])
%o A291116 def a(n): return sum([b(j, 1)*n**(n - j)*binomial(n - 1, j - 1) for j in range(n + 1)])
%o A291116 print([a(n) for n in range(26)]) # _Indranil Ghosh_, Aug 18 2017
%Y A291116 Column k=10 of A222029.
%K A291116 nonn
%O A291116 0,8
%A A291116 _Alois P. Heinz_, Aug 17 2017