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.
%I A218003 #17 Apr 28 2025 08:43:35 %S A218003 1,1,1,3,9,21,81,351,1233,46089,434241,2359611,27387801,264333213, %T A218003 1722161169,16514298711,163094452641,1216239520401,50883607918593, %U A218003 866931703203699,8473720481213481,166915156382509221,2699805625227141201,28818706120636531023,439756550972215638129,6766483260087819272601,77096822666547068590401,406859605390184444341678251 %N A218003 Number of degree-n permutations of order a power of 3. %C A218003 Differs from A053499 first at n=27. - _Alois P. Heinz_, Jan 25 2014 %H A218003 Alois P. Heinz, <a href="/A218003/b218003.txt">Table of n, a(n) for n = 0..200</a> %F A218003 E.g.f.: exp( Sum_{n>=0} x^(3^n)/3^n ). %e A218003 E.g.f.: A(x) = 1 + x + x^2/2! + 3*x^3/3! + 9*x^4/4! + 21*x^5/5! + 81*x^6/6! +... %e A218003 where %e A218003 log(A(x)) = x + x^3/3 + x^9/9 + x^27/27 + x^81/81 +...+ x^3^n/3^n +... %p A218003 a:= proc(n) option remember; `if`(n<0, 0, `if`(n=0, 1, %p A218003 add(mul(n-i, i=1..3^j-1)*a(n-3^j), j=0..ilog[3](n)))) %p A218003 end: %p A218003 seq(a(n), n=0..30); # _Alois P. Heinz_, Jan 25 2014 %t A218003 a[n_] := a[n] = If[n < 0, 0, If[n == 0, 1, Sum[Product[n-i, {i, 1, 3^j-1}]*a[n-3^j], {j, 0, Floor@Log[3, n]}]]]; %t A218003 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Apr 28 2025, after _Alois P. Heinz_ *) %o A218003 (PARI) {a(n)=n!*polcoeff(exp(sum(k=0,ceil(log(n+1)/log(3)),x^(3^k)/3^k)+x*O(x^n)),n)} %o A218003 for(n=0,30,print1(a(n),", ")) %Y A218003 Cf. A005388, A053499. %K A218003 nonn %O A218003 0,4 %A A218003 _Paul D. Hanna_, Oct 17 2012