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 A000831 #107 Dec 02 2023 11:04:24 %S A000831 1,2,4,16,80,512,3904,34816,354560,4063232,51733504,724566016, %T A000831 11070525440,183240753152,3266330312704,62382319599616, %U A000831 1270842139934720,27507470234550272,630424777638805504,15250953398036463616,388362339077351014400,10384044045105304174592 %N A000831 Expansion of e.g.f. (1 + tan(x))/(1 - tan(x)). %H A000831 Alois P. Heinz, <a href="/A000831/b000831.txt">Table of n, a(n) for n = 0..432</a> (first 84 terms from R. J. Mathar) %H A000831 William Y. C. Chen and Amy M. Fu, <a href="https://arxiv.org/abs/2204.01497">The Dumont Ansatz for the Eulerian Polynomials, Peak Polynomials and Derivative Polynomials</a>, arXiv:2204.01497 [math.CO], 2022. %H A000831 D. Dumont, <a href="http://dx.doi.org/10.1006/aama.1995.1014">Further triangles of Seidel-Arnold type and continued fractions related to Euler and Springer numbers</a>, Adv. Appl. Math., 16 (1995), 275-296. %H A000831 M. S. Tokmachev, <a href="https://vestnik.susu.ru/mmph/article/viewFile/8337/6806">Correlations Between Elements and Sequences in a Numerical Prism</a>, Bulletin of the South Ural State University, Ser. Mathematics. Mechanics. Physics, 2019, Vol. 11, No. 1, 24-33. %F A000831 E.g.f.: tan(x+Pi/4). %F A000831 a(n) = Sum_{k=1..n} (if even(n+k) ( (-1)^((n+k)/2)*Sum_{j=k..n} (j!*stirling2(n,j)*2^(n-j+1)*(-1)^(j)*binomial(j-1,k-1) ), n>0. - _Vladimir Kruchinin_, Aug 19 2010 %F A000831 a(n) = 4^n*(E_{n}(1/2) + E_{n}(1))*(-1)^((n^2-n)/2) for n > 0, where E_{n}(x) is an Euler polynomial. - _Peter Luschny_, Nov 24 2010 %F A000831 a(n) = 2^n * A000111(n). - _Gerard P. Michon_, Feb 24 2011 %F A000831 From _Sergei N. Gladkovskii_, Dec 01 2011 - Jan 24 2014: (Start) %F A000831 Continued fractions: %F A000831 E.g.f.: -1 + 2/(1-x*G(0)); G(k) = 1 - (x^2)/((x^2) - (2*k + 1)*(2*k + 3)/G(k+1)). %F A000831 E.g.f.: 1 + 2*x/(U(0)-2*x) where U(k) = 4*k+1 + x/(1+x/ (4*k+3 - x/(1- x/U(k+1)))). %F A000831 E.g.f.: 1 + 2*x/(G(0)-x) where G(k) = 2*k+1 - x^2/G(k+1). %F A000831 G.f.: 1 + 2*x/Q(0), where Q(k) = 1 - 2*x*(2*k+1) - 2*x^2*(2*k+1)*(2*k+2)/( 1 - 2*x*(2*k+2) - 2*x^2*(2*k+2)*(2*k+3)/Q(k+1)). %F A000831 E.g.f.: tan(2*x) + sec(2*x) = (x-1)/(x+1) - 2*(2*x^2+3)/( T(0)*3*x*(1+x)- 2*x^2-3)/(x+1), where T(k) = 1 - x^4*(4*k-1)*(4*k+7)/( x^4*(4*k-1)*(4*k+7) - (4*k+1)*(4*k+5)*(16*k^2 + 8*k - 2*x^2 - 3)*(16*k^2 + 40*k - 2*x^2 + 21)/T(k+1)). %F A000831 E.g.f.: 1 + 2*x/Q(0), where Q(k) = 4*k+1 -x/(1 - x/( 4*k+3 + x/(1 + x/Q(k+1)))). %F A000831 E.g.f.: tan(2*x) + sec(2*x) = 2*R(0)-1, where R(k) = 1 + x/( 4*k+1 - x/(1 - x/( 4*k+3 + x/R(k+1)))). %F A000831 G.f.: 1+ G(0)*2*x/(1-2*x), where G(k) = 1 - 2*x^2*(k+1)*(k+2)/(2*x^2*(k+1)*(k+2) - (1-2*x*(k+1))*(1-2*x*(k+2))/G(k+1)). (End) %F A000831 a(n) ~ n! * (4/Pi)^(n+1). - _Vaclav Kotesovec_, Jun 15 2015 %F A000831 a(0) = 1; a(n) = 2 * Sum_{k=0..n-1} binomial(n-2,k) * a(k) * a(n-k-1). - _Ilya Gutkovskiy_, Jun 11 2020 %e A000831 (1+tan x)/(1-tan x) = 1 + 2*x/1! + 4*x^2/2! + 16*x^3/3! + 80*x^4/4! + 512*x^5/5! + ... %p A000831 A000831 := (1+tan(x))/(1-tan(x)) : for n from 0 to 200 do printf("%d %d ",n,n!*coeftayl(A000831,x=0,n)) ; end: # _R. J. Mathar_, Nov 19 2006 %p A000831 A000831 := n -> `if`(n=0,1,(-1)^((n^2-n)/2)*4^n*(euler(n,1/2)+euler( n,1))): # _Peter Luschny_, Nov 24 2010 %p A000831 # third Maple program: %p A000831 b:= proc(u, o) option remember; %p A000831 `if`(u+o=0, 1, 2*add(b(o-1+j, u-j), j=1..u)) %p A000831 end: %p A000831 a:= n-> b(n, 0): %p A000831 seq(a(n), n=0..25); # _Alois P. Heinz_, Sep 02 2020 %t A000831 Range[0, 18]! CoefficientList[Series[(1+Tan[x])/(1-Tan[x]), {x,0,18}], x] (* _Robert G. Wilson v_, Apr 16 2011 *) %t A000831 b[u_, o_] := b[u, o] = If[u+o == 0, 1, 2*Sum[b[o-1+j, u-j], {j, 1, u}]]; %t A000831 a[n_] := b[n, 0]; %t A000831 Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Dec 02 2023, after _Alois P. Heinz_ *) %o A000831 (PARI) a(n) = if( n<1, n==0, n! * polcoeff( 1 + 2 / ( 1 / tan( x + x * O(x^n)) - 1), n)) /* _Michael Somos_, Apr 16 2011 */ %o A000831 (PARI) a(n) = local(A); if( n<0, 0, A = x * O(x^n); n! * polcoeff( (cos(x + A) + sin(x + A)) / (cos(x + A) - sin(x + A)), n)) /* _Michael Somos_, Apr 16 2011 */ %o A000831 (Maxima) a(n):=sum(if evenp(n+k) then ((-1)^((n+k)/2)*sum(j!*stirling2(n,j)*2^(n-j+1)*(-1)^(j)*binomial(j-1,k-1),j,k,n)) else 0,k,1,n); /* _Vladimir Kruchinin_, Aug 19 2010 */ %o A000831 (Sage) %o A000831 @CachedFunction %o A000831 def sp(n,x) : %o A000831 if n == 0 : return 1 %o A000831 return -add(2^(n-k)*sp(k,1/2)*binomial(n,k) for k in range(n)[::2]) %o A000831 A000831 = lambda n : abs(sp(n,x)) %o A000831 [A000831(n) for n in (0..21)] # _Peter Luschny_, Jul 30 2012 %o A000831 (SageMath) %o A000831 def A000831_list(prec): %o A000831 P.<x> = PowerSeriesRing(QQ, prec) %o A000831 return P( (1+tan(x))/(1-tan(x)) ).egf_to_ogf().list() %o A000831 A000831_list(40) # _G. C. Greubel_, Mar 21 2019; Apr 28 2023 %o A000831 (Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); %o A000831 Coefficients(R!(Laplace( (1+Tan(x))/(1-Tan(x)) ))); // _G. C. Greubel_, Mar 21 2019; Apr 28 2023 %Y A000831 Bisections: A002436 and A012393. %Y A000831 Cf. A000111, A000182, A155100, A258880, A258901, A258994. %K A000831 nonn %O A000831 0,2 %A A000831 _N. J. A. Sloane_