|
|
A002105
|
|
Reduced tangent numbers: 2^n*(2^{2n} - 1)*|B_{2n}|/n, where B_n = Bernoulli numbers.
(Formerly M3655 N1487)
|
|
46
|
|
|
1, 1, 4, 34, 496, 11056, 349504, 14873104, 819786496, 56814228736, 4835447317504, 495812444583424, 60283564499562496, 8575634961418940416, 1411083019275488149504, 265929039218907754399744, 56906245479134057176170496, 13722623393637762299131396096, 3704005473270641755597685653504
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Comments from R. L. Graham, Apr 25 2006 and Jun 08 2006: "This sequence also gives the number of ways of arranging 2n tokens in a row, with 2 copies of each token from 1 through n, such that the first token is a 1 and between every pair of tokens labeled i (i=1..n-1) there is exactly one token labeled i+1.
"For example, for n=3, there are 4 possibilities: 123123, 121323, 132312 and 132132 and indeed a(3) = 4. This is the work of my Ph. D. student Nan Zang. See also A117513, A117514, A117515.
"Develin and Sullivant give another occurrence of this sequence and show that their numbers have the same generating function, although they were unable to find a 1-1-mapping between their problem and Poupard's."
The sequence 1,0,1,0,4,0,34,0,496,0,11056, ... counts increasing complete binary trees with e.g.f. sec^2(x/sqrt 2). - Wenjin Woan, Oct 03 2007
a(n) = number of increasing full binary trees on vertex set [2n-1] with the left-largest property: the largest descendant of each non-leaf vertex occurs in its left subtree (Poupard). The first Mathematica recurrence below counts these trees by number 2k-1 of vertices in the left subtree of the root: the root is necessarily labeled 1 and n necessarily occurs in the left subtree and so there are Binomial[2n-3,2k-2] ways to choose the remaining labels for the left subtree. - David Callan, Nov 29 2007
Number of bilabeled unordered increasing trees with 2n labels. - Markus Kuba, Nov 18 2014
Conjecture: taking the sequence modulo an integer k gives an eventually purely periodic sequence with period dividing phi(k). For example, the sequence taken modulo 10 begins [1, 1, 4, 4, 6, 6, 4, 4, 6, 6, 4, 4, 6, 6, ...] with an apparent period [4, 4, 6, 6] of length 4 = phi(10) beginning at a(3). - Peter Bala, May 08 2023
|
|
REFERENCES
|
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
M. Safaryan, Problem 11725, Amer. Math. Monthly, 120 (2013), 661.
|
|
FORMULA
|
E.g.f.: 2*log(sec(x / sqrt(2))) = Sum_{n>0} a(n) * x^(2*n) / (2*n)!. - Michael Somos, Jun 22 2002
O.g.f.: A(x) = x/(1-x/(1-3*x/(1-6*x/(1-10*x/(1-15*x/(... -n*(n+1)/2*x/(1 - ...))))))) (continued fraction). - Paul D. Hanna, Oct 07 2005
sqrt(2) tan( x/sqrt(2)) = Sum_(n>=0) (x^(2n+1)/(2n+1)!) a_n. - Dominique Foata and Guo-Niu Han, Oct 24 2008
Basic hypergeometric generating function: Sum_{n>=0} Product {k = 1..n} (1-exp(-2*k*t))/Product {k = 1..n} (1+exp(-2*k*t)) = 1 + t + 4*t^2/2! + 34*t^3/3! + 496*t^4/4! + ... [Andrews et al., Theorem 4]. For other sequences with generating functions of a similar type see A000364, A000464, A002439, A079144 and A158690. - Peter Bala, Mar 24 2009
E.g.f.: Sum_{n>=0} Product_{k=1..n} tanh(k*x) = Sum_{n>=0} a(n)*x^n/n!. - Paul D. Hanna, May 11 2010
a(n)=(-1)^(n+1)*sum(j!*stirling2(2*n+1,j)*2^(n+1-j)*(-1)^(j),j,1,2*n+1), n>=0. - Vladimir Kruchinin, Aug 23 2010
a(n) = upper left term in M^n, a(n+1) = sum of top row terms in M^n; where M = the infinite square production matrix:
1, 3, 0, 0, 0, 0, 0, ...
1, 3, 6, 0, 0, 0, 0, ...
1, 3, 6, 10, 0, 0, 0, ...
E.g.f. A(x) satisfies differential equation A''(x)=exp(A(x)). - Vladimir Kruchinin, Nov 18 2011
E.g.f.: For E(x)=sqrt(2)* tan( x/sqrt(2))=x/G(0); G(k)= 4*k + 1 - x^2/(8*k + 6 - x^2/G(k+1)); (from continued fraction Lambert's, 2-step). - Sergei N. Gladkovskii, Jan 14 2012
a(n) = (-1)^n*2^(n+1)*Li_{1-2*n}(-1). (See also the Mathematica prog. by Vladimir Reshetnikov.) - Peter Luschny, Jun 28 2012
G.f.: 1/G(0) where G(k) = 1 - x*( 4*k^2 + 4*k + 1 ) - x^2*(k+1)^2*( 4*k^2 + 8*k + 3)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Jan 14 2013
G.f.: 1/Q(0), where Q(k) = 1 - (k+1)*(k+2)/2*x/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 03 2013
G.f.: (1/G(0))/sqrt(x) - 1/sqrt(x), where G(k) = 1 - sqrt(x)*(2*k+1)/(1 + sqrt(x)*(2*k+1)/(1 + sqrt(x)*(k+1)/(1 - sqrt(x)*(k+1)/G(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Jul 07 2013
log(2) - 1/1 + 1/2 - 1/3 + ... + (-1)^n / n = (-1)^n / 2 * (1/n - 1 / (2*n^2) + 1 / (2*n^2)^2 - 4 / (2*n^2)^3 + ... + (-1)^k * a(k) / (2*n^2)^k + ...) asymptotic expansion. - Michael Somos, Sep 07 2013
G.f.: T(0), where T(k) = 1-x*(k+1)*(k+2)/(x*(k+1)*(k+2)-2/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 24 2013
a(n) ~ 2^(3*n+2) * n^(2*n-1/2) / (exp(2*n) * Pi^(2*n-1/2)). - Vaclav Kotesovec, Nov 03 2014
The e.g.f. A(x) = sqrt(2)*tan(x/sqrt(2)) satisfies A''(x) = A(x)*A'(x), hence the recurrence a(0) = 0, a(1) = 1, else a(n) = Sum_{i = 0..n-2} binomial(n-2,i)*a(i)*a(n-1-i) for the aerated sequence [0,1,0,1,0,4,0,34,0,496,...].
Note that the same recurrence, but with the initial conditions a(0) = 1 and a(1) = 1, produces the sequence [1,1,1,2,5,16,61,272,...] = A000111. (End)
E.g.f.: sqrt(2)*tan(x/sqrt(2)) = Sum_{n>0} a(n) * x^(2*n-1) / (2*n-1)!. - Michael Somos, Mar 05 2017
Let B(x) = A(x)/x = 1 + x + 4*x^2 + 34*x^3 + ... denote the shifted o.g.f. Then B(x) = 1/(1 + 2*x - 3*x/(1 - x/(1 + 2*x - 10*x/(1 - 6*x/(1 + 2*x - 21*x/(1 - 15*x/(1 + 2*x - 36*x/(1 - 28*x/(1 + 2*x - ...))))))))), where the coefficient sequence [3, 1, 10, 6, 21, 15, 36, 28, ...] in the partial numerators of the continued fraction is obtained by swapping adjacent triangular numbers. Cf. A079144.
It follows (by means of an equivalence transformation) that the second binomial transform of B(x), with g.f. equal to 1/(1 - 2*x)*B(x/(1 - 2*x)), has the S-fraction representation 1/(1 - 3*x/(1 - x/(1 - 10*x/(1 - 6*x/(1 - 21*x/(1 - 15*x/(1 - 36*x/(1 - 28*x/(1 - ...))))))))). Compare with the S-fraction representation of the g.f. A(x) given above by Hanna, dated Oct 7 2005. (End)
|
|
EXAMPLE
|
G.f. = x + x^2 + 4*x^3 + 34*x^4 + 496*x^5 + 11056*x^6 + 349504*x^7 + ...
|
|
MAPLE
|
S := proc(n, k) option remember; if k=0 then `if`(n=0, 1, 0) else S(n, k-1) + S(n-1, n-k) fi end: A002105 := n -> S(2*n-1, 2*n-1)/2^(n-1):
|
|
MATHEMATICA
|
u[1] = 1; u[n_]/; n>=2 := u[n] = Sum[Binomial[2n-3, 2k-2]u[k]u[n-k], {k, n-1}]; Table[u[n], {n, 8}] (* Poupard and also Develin and Sullivant, give a different recurrence that involves a symmetric sum: v[1] = 1; v[n_]/; n>=2 := v[n] = 1/2 Sum[Binomial[2n-2, 2k-1]v[k]v[n-k], {k, n-1}] *) (*David Callan, Nov 29 2007 *)
Table[(-1)^(n+1)*2^n*(2^(2n)-1)*BernoulliB[2n]/n, {n, 1, 20}] (* Vaclav Kotesovec, Nov 03 2014 *)
eulerCF[f_, len_] := Module[{g}, g[len-1]=1; g[k_]:=g[k]=1-f[k]/(f[k]-1/g[k+1]); CoefficientList[g[0] + O[x]^len, x]]; A002105List[len_] := eulerCF[(1/2) x (#+1) (#+2)&, len]; A002105List[19] (* Peter Luschny, Aug 08 2015 after Sergei N. Gladkovskii *)
|
|
PROG
|
(PARI) {a(n) = if( n<1, 0, ((-2)^n - (-8)^n) * bernfrac(2*n) / n)}; /* Michael Somos, Jun 22 2002 */
(PARI) {a(n) = if( n<0, 0, (2*n)! * polcoeff( -2 * log( cos(x / quadgen(8) + O(x^(2*n + 1)))), 2*n))}; /* Michael Somos, Jul 17 2003 */
(PARI) {a(n) = if( n<0, 0, -(-2)^(n+1) * sum(i=1, 2*n, 2^-i * sum(j=1, i, (-1)^j * binomial( i-1, j-1) * j^(2*n - 1))))}; /* Michael Somos, Sep 07 2013 */
(PARI) {a(n)=local(CF=1+x*O(x^n)); if(n<1, return(0), for(k=1, n, CF=1/(1-(n-k+1)*(n-k+2)/2*x*CF)); return(Vec(CF)[n]))} /* Paul D. Hanna */
(PARI) {a(n)=local(X=x+x*O(x^n), Egf); Egf=sum(m=0, n, prod(k=1, m, tanh(k*X))); n!*polcoeff(Egf, n)} /* Paul D. Hanna, May 11 2010 */
(Sage) # Algorithm of L. Seidel (1877)
# n -> [a(1), ..., a(n)] for n >= 1.
D = [0]*(n+2); D[1] = 1
R = []; z = 1/2; b = True
for i in(0..2*n-1) :
h = i//2 + 1
if b :
for k in range(h-1, 0, -1) : D[k] += D[k+1]
z *= 2
else :
for k in range(1, h+1, 1) : D[k] += D[k-1]
b = not b
if b : R.append(D[h]*z/h)
return R
(Python)
from sympy import bernoulli
def A002105(n): return abs(((2-(2<<(m:=n<<1)))*bernoulli(m)<<n-1)//n) # Chai Wah Wu, Apr 14 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|