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.

Previous Showing 11-20 of 53 results. Next

A161511 Number of 1...0 pairs in the binary representation of 2n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 7, 6, 7, 5, 8, 7, 8, 6, 9, 7, 8, 5, 6, 6, 7, 6, 8, 7, 8, 6, 9, 8, 9, 7, 10, 8, 9, 6, 10, 9, 10, 8, 11, 9, 10, 7, 12, 10, 11, 8, 12, 9, 10, 6, 7, 7, 8, 7, 9, 8, 9, 7, 10, 9, 10, 8, 11, 9, 10, 7, 11, 10, 11, 9, 12, 10, 11, 8, 13, 11, 12, 9, 13
Offset: 0

Views

Author

Keywords

Comments

Row (partition) sums of A125106.
a(n) is also the weight (= sum of parts) of the integer partition having viabin number n. The viabin number of an integer partition is defined in the following way. Consider the southeast border of the Ferrers board of the integer partition and consider the binary number obtained by replacing each east step with 1 and each north step, except the last one, with 0. The corresponding decimal form is, by definition, the viabin number of the given integer partition. "Viabin" is coined from "via binary". For example, consider the integer partition [2,2,2,1]. The southeast border of its Ferrers board yields 10100, leading to the viabin number 20. - Emeric Deutsch, Jul 24 2017

Examples

			For n = 5, the binary representation of 2n is 1010; the 1...0 pairs are 10xx, 1xx0, and xx10, so a(5) = 3.
		

Crossrefs

Cf. A000120, A243499 (gives the corresponding products), A227183, A056239, A243503, A006068, A163511.
Sum of prime indices of A005940.
Row sums of A125106.
A reverse version is A359043, row sums of A242628.
A029837 adds up standard compositions, row sums of A066099.
A029931 adds up binary indices, row sums of A048793.

Programs

  • Mathematica
    a[0] = 0; a[n_] := If[EvenQ[n], a[n/2] + DigitCount[n/2, 2, 1], a[(n-1)/2] + 1]; Array[a, 93, 0] (* Jean-François Alcover, Sep 09 2017 *)
  • PARI
    a(n)=local(t,k);t=0;k=1;while(n>0,if(n%2==0,k++,t+=k);n\=2);t
    
  • Python
    def A161511(n):
        a, b = 0, 0
        for i, j in enumerate(bin(n)[:1:-1], 1):
            if int(j):
                a += i-b
                b += 1
        return a # Chai Wah Wu, Jul 26 2023
  • Scheme
    ;; Two variants, the recursive one requiring memoizing definec-macro from Antti Karttunen's IntSeq-library.
    (define (A161511 n) (let loop ((n n) (i 1) (s 0)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) (+ i 1) s)) (else (loop (/ (- n 1) 2) i (+ s i))))))
    (definec (A161511 n) (cond ((zero? n) n) ((even? n) (+ (A000120 n) (A161511 (/ n 2)))) (else (+ 1 (A161511 (/ (- n 1) 2))))))
    ;; Antti Karttunen, Jun 28 2014
    

Formula

a(0) = 0; a(2n) = a(n) + A000120(n); a(2n+1) = a(n) + 1.
From Antti Karttunen, Jun 28 2014: (Start)
Can be also obtained by mapping with an appropriate permutation from the lists of partition sizes computed for other enumerations similar to A125106:
a(n) = A227183(A006068(n)).
a(n) = A056239(A005940(n+1)).
a(n) = A243503(A163511(n)). (End)
a(n) = A029931(n) - binomial(A000120(n),2). - Gus Wiseman, Jan 03 2023
a(n) = a(n - A048896(n-1)) + 1 for n>=1 (see Peter J. Taylor link). - Mikhail Kurkov, Jul 04 2025

A358134 Triangle read by rows whose n-th row lists the partial sums of the n-th composition in standard order (row n of A066099).

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 3, 1, 3, 1, 2, 3, 4, 3, 4, 2, 4, 2, 3, 4, 1, 4, 1, 3, 4, 1, 2, 4, 1, 2, 3, 4, 5, 4, 5, 3, 5, 3, 4, 5, 2, 5, 2, 4, 5, 2, 3, 5, 2, 3, 4, 5, 1, 5, 1, 4, 5, 1, 3, 5, 1, 3, 4, 5, 1, 2, 5, 1, 2, 4, 5, 1, 2, 3, 5, 1, 2, 3, 4, 5, 6, 5, 6, 4, 6, 4, 5
Offset: 1

Views

Author

Gus Wiseman, Oct 31 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			Triangle begins:
  1
  2
  1 2
  3
  2 3
  1 3
  1 2 3
  4
  3 4
  2 4
  2 3 4
  1 4
  1 3 4
  1 2 4
  1 2 3 4
		

Crossrefs

See link for sequences related to standard compositions.
First element in each row is A065120.
Rows are the partial sums of rows of A066099.
Last element in each row is A070939.
An adjusted version is A242628, ranked by A253565.
The first differences instead of partial sums are A358133.
The version for Heinz numbers of partitions is A358136, ranked by A358137.
Row sums are A359042.
A011782 counts compositions.
A351014 counts distinct runs in standard compositions.
A358135 gives last minus first of standard compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Join@@Table[Accumulate[stc[n]],{n,100}]

A357135 Take the k-th composition in standard order for each part k of the n-th composition in standard order; then concatenate.

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Sep 26 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			Triangle begins:
   0:
   1: 1
   2: 2
   3: 1 1
   4: 1 1
   5: 2 1
   6: 1 2
   7: 1 1 1
   8: 3
   9: 1 1 1
  10: 2 2
  11: 2 1 1
  12: 1 1 1
  13: 1 2 1
  14: 1 1 2
  15: 1 1 1 1
		

Crossrefs

See link for sequences related to standard compositions.
Row n is the A357134(n)-th composition in standard order.
The version for Heinz numbers of partitions is A357139, cf. A003963.
Row sums are A357186, differences A357187.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Join@@Table[Join@@stc/@stc[n],{n,0,30}]

Formula

Row n is the A357134(n)-th composition in standard order.

A117972 Numerator of zeta'(-2n), n >= 0.

Original entry on oeis.org

1, -1, 3, -45, 315, -14175, 467775, -42567525, 638512875, -97692469875, 9280784638125, -2143861251406875, 147926426347074375, -48076088562799171875, 9086380738369043484375, -3952575621190533915703125
Offset: 0

Views

Author

Eric W. Weisstein, Apr 06 2006

Keywords

Comments

In A160464 the coefficients of the ES1 matrix are defined. This matrix led to the discovery that the successive differences of the ES1[1-2*m,n] coefficients for m = 1, 2, 3, ..., are equal to the values of zeta'(-2n), see also A094665 and A160468. - Johannes W. Meijer, May 24 2009
A048896(n), n >= 1: Numerators of Maclaurin series for 1 - ((sin x)/x)^2,
a(n), n >= 2: Denominators of Maclaurin series for 1 - ((sin x)/x)^2, the correlation function in Montgomery's pair correlation conjecture. - Daniel Forgues, Oct 16 2011
From Andrey Zabolotskiy, Sep 23 2021: (Start)
zeta'(-2n), which is mentioned in the Name, is irrational. For n > 0, a(n) is the numerator of the rational fraction g(n) = Pi^(2n)*zeta'(-2n)/zeta(2n+1). The denominator is 4*A048896(n-1). g(n) = f(n) for n > 0, where f(n) is given in the Formula section. Also, f(n) = Bernoulli(2n)/z(n)/4 (see Formula section) for all n.
For n = 0, zeta'(0) = -log(2Pi)/2, g(0) can be set to 0 because of the infinite denominator. However, a(0) is set to 1 because it is the numerator of f(0).
It seems that -4*f(n)*alpha_n = A000182(n), where alpha_n = A191657(n, p(n)) / A191658(n, p(n)) [where p(n) = A000041(n)] is the n-th "elementary coefficient" from the paper by Izaurieta et al. (End)

Examples

			-1/4, 3/4, -45/8, 315/4, -14175/8, 467775/8, -42567525/16, ...
-zeta(3)/(4*Pi^2), (3*zeta(5))/(4*Pi^4), (-45*zeta(7))/(8*Pi^6), (315*zeta(9))/(4*Pi^8), (-14175*zeta(11))/(8*Pi^10), ...
		

Crossrefs

From Johannes W. Meijer, May 24 2009: (Start)
Absolute values equal row sums of A160468. (End)

Programs

  • Maple
    # Without rational arithmetic
    a := n -> (-1)^n*(2*n)!*2^(add(i,i=convert(n,base,2))-2*n);
    # Peter Luschny, May 02 2009
  • Mathematica
    Table[Numerator[(2 n)!/2^(2 n + 1) (-1)^n], {n, 0, 30}]
  • Maxima
    L:taylor(1/x*sin(sqrt(x))^2,x,0,15); makelist(denom(coeff(L,x,n))*(-1)^(n+1),n,0,15); /* Vladimir Kruchinin, May 30 2011 */

Formula

a(n) = numerator(f(n)) where f(n) = (2*n)!/2^(2*n + 1)(-1)^n, from the Mathematica code.
From Terry D. Grant, May 28 2017: (Start)
|a(n)| = A049606(2n).
a(n) = -numerator(Bernoulli(2n)/z(n)) where Bernoulli(2n) = A000367(n) / A002445(n) and z(n) = A046988(n) / A002432(n) for n > 0. (End) [Corrected by Andrey Zabolotskiy, Sep 23 2021]

Extensions

First term added, offset changed and edited by Johannes W. Meijer, May 15 2009

A160469 The left hand column of the triangle A160468.

Original entry on oeis.org

1, 1, 2, 17, 62, 1382, 21844, 929569, 6404582, 443861162, 18888466084, 1936767361654, 58870668456604, 8374643517010684, 689005380505609448, 129848163681107301953, 1736640792209901647222, 418781231495293038913922
Offset: 1

Views

Author

Johannes W. Meijer, May 24 2009

Keywords

Comments

Resembles A002430, the numerators of the Taylor series for tan(x). The first difference occurs at a(12). (Its resemblance to this sequence led to the conjecture A160469(n) = A002430(n)*A089170(n-1).)

Crossrefs

Equals the first left hand column of A160468.
Equals A002430(n)*A089170(n-1).
Equals (A002430(n)/A036279(n))*(A117972(n)/A000265(n)).
Equals A048896(n-1)*A002425(n).
Cf. A156769 (which resembles the denominators of the Taylor series for tan(x)).

Formula

a(n) = A002430(n)*A089170(n-1) with A002430 (n) = numer((-1)^(n-1)*2^(2*n)*(2^(2*n)-1)* bernoulli(2*n)/(2*n)!) and A089170 (n-1) = numer(2*bernoulli(2*n)* (4^n-1)/(2*n))/ numer((4^n-1)*bernoulli(2*n)/(2*n)!) for n = 1, 2, 3, ....

A245196 Write n>=1 as either n=2^k-2^r with 0 <= r <= k-1, in which case a(2^k-2^r)=wt(k-r-1), or as n=2^k-2^r+j with 2 <= r <= k-1, 1 <= j < 2^r-1, in which case a(2^k-2^r+j)=a(j)*wt(k-r-1) (where wt(i) = A000120(i)).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2014

Keywords

Comments

Other sequences defined by a recurrence of this class (see the Formula and Maple sections) include A245180, A245195, A048896, A245536, A038374.

Examples

			May be arranged into blocks of lengths 1,2,4,8,...:
0,
0, 1,
0, 0, 1, 1,
0, 0, 0, 0, 1, 0, 1, 2,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 1, 2,
...
		

Crossrefs

Programs

  • Maple
    Maple code for this sequence:
    wt := proc(n) local w, m, i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end:
    G:=[seq(wt(n),n=0..30)];
    m:=1;
    f:=proc(n) option remember; global m,G; local k,r,j,np;
       k:=1+floor(log[2](n)); np:=2^k-n;
       if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
       if j=0 then G[k-r]; else m*G[k-r]*f(j); fi;
    end;
    [seq(f(n),n=1..120)];
    # Maple code for the general recurrence:
    G:=[seq(wt(n),n=0..30)]; # replace this by a list G=[G(0), G(1), G(2), ...], remembering that you have to tell Maple G[1] to get G(0), G[2] to get G(1), etc.
    m:=1; # replace this by the correct multiplier
    f:=proc(n) option remember; global m,G; local k,r,j,np;
       k:=1+floor(log[2](n)); np:=2^k-n;
       if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
       if j=0 then G[k-r-1+1]; else m*G[k-r-1+1]*f(j); fi;
    end;
    [seq(f(n),n=1..120)];
    # If G(n) = wt(n) and m=1 we get the present sequence
    # If G(n) = A083424(n) and m=1 we get A245537
    # If G(n) = A083424(n) and m=2 we get A245538
    # If G(n) = A083424(n) and m=4 we get A245539
    # If G(n) = A083424(n) and m=8 we get A245180 (and presumably A160239)
    # If G(n) = n (n>=0) and m=1 we get A245536
    # If G(n) = n+1 (n>=0) and m=1 we get A038374
    # If G(n) = (n+1)(n+2)/2 (n>=0) and m=1 we get A245541
    # If G(n) = (n+1)(n+2)/2 (n>=0) and m=2 we get A245547
    # If G(n) = 2^n (n>=0) and m=1 we get A245195 (= 2^A014081)
    # If G(n) = 2^n (n>=0) and m=2 we get A048896

Formula

This is an example of a class of sequences defined by the following recurrence.
We first choose a sequence G = [G(0), G(1), G(2), G(3), ...], which are the terms that will appear at the ends of the blocks: a(2^k-1) = G(k-1), and we also choose a parameter m (the "multiplier"). Then the recurrence (this defines a(1), a(2), a(3), ...) is:
a(2^k-2^r)=G(k-r-1) if 0 <= r <= k-1, a(2^k-2^r+j)=m*a(j)*G(k-r-1) if 2 <= r <= k-1, 1 <= j < 2^r-1.
To help apply the recurrence, here are the values of k,r,j for the first few values of n (if n=2^k-2^r we set j=0, although it is not used):
n: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
k: 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4
r: 0 1 0 2 2 1 0 3 3 3 3 2 2 1 0
j: 0 0 0 0 1 0 0 0 1 2 3 0 1 0 0
--------------------------------------------------
n: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
k: 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
r: 4 4 4 4 4 4 4 4 3 3 3 3 2 2 1 0
j: 0 1 2 3 4 5 6 7 0 1 2 3 0 1 0 0
--------------------------------------------------
In the present example G(n) = wt(n) and m=1.

A357134 Take the k-th composition in standard order for each part k of the n-th composition in standard order; then set a(n) to be the index (in standard order) of the concatenation.

Original entry on oeis.org

0, 1, 2, 3, 3, 5, 6, 7, 4, 7, 10, 11, 7, 13, 14, 15, 5, 9, 14, 15, 11, 21, 22, 23, 12, 15, 26, 27, 15, 29, 30, 31, 6, 11, 18, 19, 15, 29, 30, 31, 20, 23, 42, 43, 23, 45, 46, 47, 13, 25, 30, 31, 27, 53, 54, 55, 28, 31, 58, 59, 31, 61, 62, 63, 7, 13, 22, 23, 19
Offset: 0

Views

Author

Gus Wiseman, Sep 24 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their corresponding standard compositions begin:
   0: ()
   1: (1)
   2: (2)
   3: (1,1)
   3: (1,1)
   5: (2,1)
   6: (1,2)
   7: (1,1,1)
   4: (3)
   7: (1,1,1)
  10: (2,2)
  11: (2,1,1)
   7: (1,1,1)
  13: (1,2,1)
  14: (1,1,2)
  15: (1,1,1,1)
		

Crossrefs

See link for sequences related to standard compositions.
The version for Heinz numbers of partitions is A003963.
The vertex-degrees are A048896.
The a(n)-th composition in standard order is row n of A357135.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[Join@@stc/@stc[n]],{n,0,30}]

Formula

For n > 0, the value n appears A048896(n - 1) times.
Row a(n) of A066099 = row n of A357135.

A117973 a(n) = 2^(wt(n)+1), where wt() = A000120().

Original entry on oeis.org

2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 8, 16, 16, 32, 16, 32, 32, 64, 16, 32, 32, 64, 32, 64, 64, 128, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32
Offset: 0

Views

Author

Eric W. Weisstein, Apr 06 2006

Keywords

Comments

Denominator of Zeta'(-2n).
If Gould's sequence A001316 is written as a triangle, this is what the rows converge to. In other words, let S_0 = [2], and construct S_{n+1} by following S_n with 2*S_n. Then this is S_{oo}. - N. J. A. Sloane, May 30 2009
In A160464 the coefficients of the ES1 matrix are defined. This matrix led to the discovery that the successive differences of the ES1[1-2*m,n] coefficients for m = 1, 2, 3, ..., are equal to the values of Zeta'(-2n), see also A094665 and A160468. - Johannes W. Meijer, May 24 2009

Examples

			-zeta(3)/(4*Pi^2), (3*zeta(5))/(4*Pi^4), (-45*zeta(7))/(8*Pi^6), (315*zeta(9))/(4*Pi^8), (-14175*zeta(11))/(8*Pi^10), ...
		

Crossrefs

Programs

  • Maple
    S := [2]; S := [op(S), op(2*S)]; # repeat ad infinitum! - N. J. A. Sloane, May 30 2009
    a := n -> 2^(add(i,i=convert(n,base,2))+1); # Peter Luschny, May 02 2009
  • Mathematica
    Denominator[(2*n)!/2^(2*n + 1)]

Formula

For n>=0, a(n) = 2 * A001316(n). - N. J. A. Sloane, May 30 2009
For n>0, a(n) = 4 * A048896(n). - Peter Luschny, May 02 2009
a(0) = 2; for n>0, write n = 2^i + j where 0 <= j < 2^i; then a(n) = 2*a(j).
a((2*n+1)*2^p-1) = 2^(p+1) * A001316(n), p >= 0. - Johannes W. Meijer, Jan 28 2013

Extensions

Entry revised by N. J. A. Sloane, May 30 2009

A160476 The first right hand column of the Zeta and Lambda triangles.

Original entry on oeis.org

1, 10, 210, 420, 4620, 60060, 60060, 2042040, 116396280, 581981400, 13385572200, 13385572200, 13385572200, 388181593800, 12033629407800, 24067258815600, 24067258815600, 890488576177200, 890488576177200
Offset: 2

Views

Author

Johannes W. Meijer, May 24 2009

Keywords

Comments

This intriguing sequence makes its appearance in the Zeta and Lambda triangles.
The first Maple algorithm is related to the Zeta triangle and the second to the Lambda triangle. Both generate the sequence of the first right hand column of these triangles.

Crossrefs

The Zeta and Lambda triangles are A160474 and A160487.
Appears in A162446 (ZG1 matrix) and A162448 (LG1 matrix) [Johannes W. Meijer, Jul 06 2009]

Programs

  • Maple
    nmax := 20; with(combinat): cfn1 := proc(n, k): sum((-1)^j*stirling1(n+1, n+1-k+j) * stirling1(n+1, n+1-k-j), j=-k..k) end proc: Omega(0) := 1: for n from 1 to nmax do Omega(n) := (sum((-1)^(k1+n+1)*(bernoulli(2*k1)/(2*k1))*cfn1(n-1, n-k1), k1=1..n))/(2*n-1)! end do: for n from 1 to nmax do d(n) := 2^(2*n-1)*Omega(n) end do: for n from 2 to nmax do Zc(n-1) := d(n-1)*2/((2*n-1)*(n-1)) end do: c(1) := denom(Zc(1)): for n from 1 to nmax-1 do c(n+1) := lcm(c(n)*(n+1)*(2*n+3)/2, denom(Zc(n+1))): p(n+1) := c(n) end do: for n from 2 to nmax do a1(n) := p(n)*2^(2*n-3)/(3*factorial(2*n-1)) od: seq(a1(n), n=2..nmax);
    # End first program (program edited, Johannes W. Meijer, Sep 20 2012)
    nmax1 := nmax: for n from 0 to nmax1 do cfn2(n, 0) := 1: cfn2(n, n) := (doublefactorial(2*n-1))^2 od: for n from 1 to nmax1 do for k from 1 to n-1 do cfn2(n, k) := (2*n-1)^2*cfn2(n-1, k-1) + cfn2(n-1, k) od: od: for n from 1 to nmax1 do Delta(n-1) := sum((1-2^(2*k1-1))* (-1)^(n+1)*(-bernoulli(2*k1)/(2*k1))*(-1)^(k1+n)*cfn2(n-1,n-k1), k1=1..n) /(2*4^(n-1)*(2*n-1)!); LAMBDA(-2, n) := sum(2*(1-2^(2*k1-1))*(-bernoulli(2*k1)/ (2*k1))*(-1)^(k1+n)* cfn2(n-1,n-k1), k1=1..n)/ factorial(2*n-2) end do: Lcgz(2) := 1/12: f(2) := 1/12: for n from 3 to nmax1 do Lcgz(n) := LAMBDA(-2, n-1)/((2*n-2)*(2*n-3)): f(n) := Lcgz(n)-((2*n-3)/(2*n-2))*f(n-1) end do: for n from 1 to nmax1 do b(n) := denom(Lcgz(n+1)) end do: for n from 1 to nmax1 do b(n) := 2*n*denom(Delta(n-1))/2^(2*n) end do: p(2) := b(1): for n from 2 to nmax1 do p(n+1) := lcm(p(n)*(2*n)*(2*n-1), b(n)) end do: for n from 2 to nmax1 do a2(n) := p(n)/(6*factorial(2*n-2)) od: seq(a2(n), n=2..nmax1);
    # End second program (program edited, Johannes W. Meijer, Sep 20 2012)

Formula

a(n) = A160490(n)/(6*(2*n-2)!) for n = 2, 3, .. .
a(n) = A160478(n)*M(n) with M(n) = 2^(2*n-3)/(3*(2*n-1)!) for n=2, 3, .. .
M(n) = A048896(n-2)/(9*M1(n-1)) with M1(n) = (2*n+1)*A000265(n)*M1(n-1) for n = 2, 3, .. , and M1(1) = 1.
a(n+1)/a(n) = A160479(n+1) [Johannes W. Meijer, Oct 07 2009]

A220002 Numerators of the coefficients of an asymptotic expansion in even powers of the Catalan numbers.

Original entry on oeis.org

1, 5, 21, 715, -162877, 19840275, -7176079695, 1829885835675, -5009184735027165, 2216222559226679575, -2463196751104762933637, 1679951011110471133453965, -5519118103058048675551057049, 5373485053345792589762994345215, -12239617587594386225052760043303511
Offset: 0

Views

Author

Peter Luschny, Dec 27 2012

Keywords

Comments

Let N = 4*n+3 and A = sum_{k>=0} a(k)/(A123854(k)*N^(2*k)) then
C(n) ~ 8*4^n*A/(N*sqrt(N*Pi)), C(n) = (4^n/sqrt(Pi))*(Gamma(n+1/2)/ Gamma(n+2)) the Catalan numbers A000108.
The asymptotic expansion of the Catalan numbers considered here is based on the Taylor expansion of square root of the sine cardinal. This asymptotic series involves only even powers of N, making it more efficient than the asymptotic series based on Stirling's approximation to the central binomial which involves all powers (see for example: D. E. Knuth, 7.2.1.6 formula (16)). The series is discussed by Kessler and Schiff but is included as a special case in the asymptotic expansion given by J. L. Fields for quotients Gamma(x+a)/Gamma(x+b) and discussed by Y. L. Luke (p. 34-35), apparently overlooked by Kessler and Schiff.

Examples

			With N = 4*n+3 the first few terms of A are A = 1 + 5/(4*N^2) + 21/(32*N^4) + 715/(128*N^6) - 162877/(2048*N^8) + 19840275/(8192*N^10). With this A C(n) = round(8*4^n*A/(N*sqrt(N*Pi))) for n = 0..39 (if computed with sufficient numerical precision).
		

References

  • Donald E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees—History of Combinatorial Generation, 2006.
  • Y. L. Luke, The Special Functions and their Approximations, Vol. 1. Academic Press, 1969.

Crossrefs

The logarithmic version is A220422. Appears in A193365 and A220466.
Cf. A220412.

Programs

  • Maple
    A220002 := proc(n) local s; s := n -> `if`(n > 0, s(iquo(n,2))+n, 0);
    (-1)^n*mul(4*i+2, i = 1..2*n)*2^s(iquo(n,2))*coeff(taylor(sqrt(sin(x)/x), x,2*n+2), x, 2*n) end: seq(A220002(n), n = 0..14);
    # Second program illustrating J. L. Fields expansion of gamma quotients.
    A220002 := proc(n) local recF, binSum, swing;
    binSum := n -> add(i,i=convert(n,base,2));
    swing := n -> n!/iquo(n, 2)!^2;
    recF := proc(n, x) option remember; `if`(n=0, 1, -2*x*add(binomial(n-1,2*k+1)*bernoulli(2*k+2)/(2*k+2)*recF(n-2*k-2,x),k=0..n/2-1)) end: recF(2*n,-1/4)*2^(3*n-binSum(n))*swing(4*n+1) end:
  • Mathematica
    max = 14; CoefficientList[ Series[ Sqrt[ Sinc[x]], {x, 0, 2*max+1}], x^2][[1 ;; max+1]]*Table[ (-1)^n*Product[ (2*k+1), {k, 1, 2*n}], {n, 0, max}] // Numerator (* Jean-François Alcover, Jun 26 2013 *)
  • Sage
    length = 15; T = taylor(sqrt(sin(x)/x),x,0,2*length+2)
    def A005187(n): return A005187(n//2) + n if n > 0 else 0
    def A220002(n):
        P = mul(4*i+2 for i in (1..2*n)) << A005187(n//2)
        return (-1)^n*P*T.coefficient(x, 2*n)
    [A220002(n) for n in range(length)]
    
  • Sage
    # Second program illustrating the connection with the Euler numbers.
    def A220002_list(n):
        S = lambda n: sum((4-euler_number(2*k))/(4*k*x^(2*k)) for k in (1..n))
        T = taylor(exp(S(2*n+1)),x,infinity,2*n-1).coefficients()
        return [t[0].numerator() for t in T][::-1]
    A220002_list(15)

Formula

Let [x^n]T(f(x)) denote the coefficient of x^n in the Taylor expansion of f(x) then r(n) = (-1)^n*prod_{i=1..2n}(2i+1)*[x^(2*n)]T(sqrt(sin(x)/x)) is the rational coefficient of the asymptotic expansion (in N=4*n+3) and a(n) = numerator(r(n)) = r(n)*2^(3*n-bs(n)), where bs(n) is the binary sum of n (A000120).
Also a(n) = numerator([x^(2*n)]T(exp(S))) where S = sum_{k>=1}((4-E(2*k))/ (4*k)*x^(2*k)) and E(n) the Euler numbers A122045.
Also a(n) = sf(4*n+1)*2^(3*n-bs(n))*F_{2*n}(-1/4) where sf(n) is the swinging factorial A056040, bs(n) the binary sum of n and F_{n}(x) J. L. Fields' generalized Bernoulli polynomials A220412.
In terms of sequences this means
r(n) = (-1)^n*A103639(n)*A008991(n)/A008992(n),
a(n) = (-1)^n*A220371(n)*A008991(n)/A008992(n).
Note that a(n) = r(n)*A123854(n) and A123854(n) = 2^A004134(n) = 8^n/2^A000120(n).
Formula from Johannes W. Meijer:
a(n) = d(n+1)*A098597(2*n+1)*(A008991(n)/A008992(n)) with d(1) = 1 and
d(n+1) = -4*(2*n+1)*A161151(n)*d(n),
d(n+1) = (-1)^n*2^(-1)*(2*(n+1))!*A060818(n)*A048896(n).
Previous Showing 11-20 of 53 results. Next