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 A202038 #69 Feb 27 2025 07:57:41 %S A202038 1,-1,-1,5,17,-121,-721,6845,58337,-698161,-7734241,111973685, %T A202038 1526099057,-25947503401,-419784870961,8200346492525,153563504618177, %U A202038 -3389281372287841,-72104198836466881,1774459993676715365,42270463533824671697,-1147649139272698443481 %N A202038 Hafnian of a +/-1 array. %C A202038 a(n) is the Hafnian of the triangular array (a(i,j))_{1<=i<j<=2n} defined by a(i,j) = (-1)^i. The Hafnian is the same as the Pfaffian except without the alternating signs, that is, the Hafnian of the upper triangular array (a(i,j))_{1<=i<j<=2n} is the sum of the products a(i1,j1)*a(i2,j2)*...*a(in,jn) taken over all perfect matchings of [2n] written so that i1<j1, i2<j2, ..., in<jn and i1<i2<...<in. %C A202038 a(n) is also the total weight of Dyck n-paths with the weight of a Dyck path defined as (-1)^(sum of the upstep heights) times the product of the upstep heights. For example, the Dyck 4-path P = UUDUUDDD has upsteps ending at heights 1,2,2,3 respectively and so weight(P) = (-1)^8 times (1*2*2*3) = +12. %H A202038 Vincenzo Librandi, <a href="/A202038/b202038.txt">Table of n, a(n) for n = 0..200</a> %H A202038 StackExchange, <a href="http://math.stackexchange.com/questions/6939/">Mystery regarding power series of 1/sqrt(1+x^x)</a>, Question 6939. %F A202038 E.g.f.: sqrt(2/(1 + exp(4*x))). %F A202038 G.f.: 1/(1 + x/(1 - 2 x/(1 + 3 x /(1 - 4 x/(1 + 5 x /(1 - 6 x/ (1 + ...))))))) (continued fraction). %F A202038 G.f.: 1/G(0) where G(k) = 1 + x*(2*k+1)/(1 - (2*k+2)*x/G(k+1)); (continued fraction, 2-step). - _Sergei N. Gladkovskii_, Aug 11 2012 %F A202038 G.f.: 1/(U(0) + x) where U(k) = 1 + x*(2*k+1)*(2*k+2) - x*(2*k+1)*(2*k+2)/(1 + x/U(k+1)); (continued fraction, 2-step). - _Sergei N. Gladkovskii_, Oct 13 2012 %F A202038 G.f.: 1/U(0) where U(k) = 1 + x + x^2*(2*k+1)*(2*k+2)/U(k+1); (continued fraction, 1-step). - _Sergei N. Gladkovskii_, Oct 13 2012 %F A202038 a(n) ~ (cos(n*Pi/2)-sin(n*Pi/2)) * 2^(2*n+3/2) *n^n / (Pi^(n+1/2) * exp(n)). - _Vaclav Kotesovec_, Oct 08 2013 %F A202038 G.f.: T(0)/(1+x), where T(k) = 1 - x^2*(2*k+1)*(2*k+2)/( x^2*(2*k+1)*(2*k+2) + (1+x)^2/T(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Oct 22 2013 %F A202038 a(n) = 4^(n-1)*Sum_{k=0..n-1} (((-1)^(k+1) * (k+1)! * binomial(2*k+2, k+1) * stirling2(n, k+1)) / 2^(3*k+1)), n>0, a(0)=1. - _Vladimir Kruchinin_, Mar 09 2016 %t A202038 u[n_, 0] := If[n==0, 1, 0]; u[n_, m_] /; m==1 := 2^(n - 1); u[n_, m_] /; m==n>=1 := 1; u[n_, m_] /; 1<m<n := u[n, m] = (2m)*u[n - 1, m] + (2n - 2m + 1)*u[n - 1, m - 1]; v[n_] := Sum[(-1)^m u[n, m], {m,0, n}]; Table[v[n], {n, 0, 20}] %t A202038 Flatten[{1, Table[4^(n-1) * Sum[(-1)^(k+1) * (k+1)! * Binomial[2*k + 2, k + 1] * StirlingS2[n, k + 1]/2^(3*k + 1), {k, 0, n-1}], {n, 1, 20}]}] (* _Vaclav Kotesovec_, Mar 09 2016, after _Vladimir Kruchinin_ *) %o A202038 (Maxima) %o A202038 a(n):=if n=0 then 1 else 4^(n-1)*sum(((-1)^(k+1)*(k+1)!*binomial(2*k+2,k+1)*stirling2(n,k+1))/2^(3*k+1),k,0,n-1); /* _Vladimir Kruchinin_, Mar 09 2016 */ %Y A202038 Absolute values give A012259. Alternating row sums of A185411. %K A202038 sign %O A202038 0,4 %A A202038 _David Callan_, Dec 13 2011