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.

Showing 1-10 of 14 results. Next

A377226 Take the sequence of the signed denominators of Leibniz series for Pi/4 (cf. A157142) and permute the terms so that a negative term follows every two positive terms and the absolute difference between two consecutive terms of the same sign is 4.

Original entry on oeis.org

1, 5, -3, 9, 13, -7, 17, 21, -11, 25, 29, -15, 33, 37, -19, 41, 45, -23, 49, 53, -27, 57, 61, -31, 65, 69, -35, 73, 77, -39, 81, 85, -43, 89, 93, -47, 97, 101, -51, 105, 109, -55, 113, 117, -59, 121, 125, -63, 129, 133, -67, 137, 141, -71, 145, 149, -75, 153, 157, -79, 161
Offset: 0

Views

Author

Stefano Spezia, Oct 20 2024

Keywords

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 1.4.1, p. 20.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,2,0,0,-1},{1,5,-3,9,13,-7},61]

Formula

a(n) = 2*a(n-3) - a(n-6) for n > 5.
a(n)= (9 + 12*n - 6*n*A061347(n) + 6*(2 + 3*n)*A049347(n+2))/9.
G.f.: (1 + 5*x - 3*x^2 + 7*x^3 + 3*x^4 - x^5)/(1 - x^3)^2.
E.g.f.: exp(-x/2)*(3*exp(3*x/2)*(3 + 4*x) + 12*x*cos(sqrt(3)*x/2) + 4*sqrt(3)*(2 - 3*x)*sin(sqrt(3)*x/2))/9.
Sum_{n>=0} 1/a(n) = (log(2) + Pi)/4 = A377227.

A000354 Expansion of e.g.f. exp(-x)/(1-2*x).

Original entry on oeis.org

1, 1, 5, 29, 233, 2329, 27949, 391285, 6260561, 112690097, 2253801941, 49583642701, 1190007424825, 30940193045449, 866325405272573, 25989762158177189, 831672389061670049, 28276861228096781665, 1017967004211484139941, 38682746160036397317757
Offset: 0

Views

Author

Keywords

Comments

a(n) is the permanent of the n X n matrix with 1's on the diagonal and 2's elsewhere. - Yuval Dekel, Nov 01 2003. Compare A157142.
Starting with offset 1 = lim_{k->infinity} M^k, where M = a tridiagonal matrix with (1,0,0,0,...) in the main diagonal, (1,3,5,7,...) in the subdiagonal and (2,4,6,8,...) in the subsubdiagonal. - Gary W. Adamson, Jan 13 2009
a(n) is also the number of (n-1)-dimensional facet derangements for the n-dimensional hypercube. - Elizabeth McMahon, Gary Gordon (mcmahone(AT)lafayette.edu), Jun 29 2009
a(n) is the number of ways to write down each n-permutation and underline some (possibly none or all) of the elements that are not fixed points. a(n) = Sum_{k=0..n} A008290(n,k)*2^(n-k). - Geoffrey Critzer, Dec 15 2012
Type B derangement numbers: the number of fixed point free permutations in the n-th hyperoctahedral group of signed permutations of {1,2,...,n}. See Chow 2006. See A000166 for type A derangement numbers. - Peter Bala, Jan 30 2015

Examples

			G.f. = 1 + x + 5*x^2 + 29*x^3 + 233*x^4 + 2329*x^5 + 27949*x^6 + 391285*x^7 + ... - _Michael Somos_, Apr 14 2018
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 83.
  • 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).

Crossrefs

Column k=2 of A320032.

Programs

  • Maple
    a := n -> (-1)^n*(1-2*n*hypergeom([1,1-n],[],2)):
    seq(simplify(a(n)), n=0..18); # Peter Luschny, May 09 2017
    a := n -> 2^n*add((n!/k!)*(-1/2)^k, k=0..n):
    seq(a(n), n=0..23); # Peter Luschny, Jan 06 2020
    seq(simplify(2^n*KummerU(-n, -n, -1/2)), n = 0..19); # Peter Luschny, May 10 2022
  • Mathematica
    FunctionExpand @ Table[ Gamma[ n+1, -1/2 ]*2^n/Exp[ 1/2 ], {n, 0, 24}]
    With[{nn=20},CoefficientList[Series[Exp[-x]/(1-2x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jul 22 2013 *)
    a[n_] := 2^n n! Sum[(-1)^i/(2^i i!), {i, 0, n}]; Table[a[n], {n, 0, 20}] (* Gerry Martens, May 06 2016 *)
    a[ n_] := If[ n < 1, Boole[n == 0], (2 n - 1) a[n - 1] + (2 n - 2) a[n - 2]]; (* Michael Somos, Sep 28 2017 *)
    a[ n_] := Sum[ (-1)^(n + k) Binomial[n, k] k! 2^k, {k, 0, n}]; (* Michael Somos, Apr 14 2018 *)
    a[ n_] := If[ n < 0, 0, (2^n Gamma[n + 1, -1/2]) / Sqrt[E] // FunctionExpand]; (* Michael Somos, Apr 14 2018 *)
    a[n_] := n! 2^n Hypergeometric1F1[-n, -n, -1/2];
    Table[a[n], {n, 0, 19}]   (* Peter Luschny, Jul 28 2024 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace(exp(-x)/(1-2*x))) \\ Joerg Arndt, Apr 15 2013
    
  • PARI
    vector(100, n, n--; sum(k=0, n, (-1)^(n+k)*binomial(n, k)*k!*2^k)) \\ Altug Alkan, Oct 30 2015
    
  • PARI
    {a(n) = if( n<1, n==0, (2*n - 1) * a(n-1) + (2*n - 2) * a(n-2))}; /* Michael Somos, Sep 28 2017 */

Formula

Inverse binomial transform of double factorials A000165. - Paul Barry, May 26 2003
a(n) = Sum_{k=0..n} (-1)^(n+k)*C(n, k)*k!*2^k. - Paul Barry, May 26 2003
a(n) = Sum_{k=0..n} A008290(n, k)*2^(n-k). - Philippe Deléham, Dec 13 2003
a(n) = 2*n*a(n-1) + (-1)^n, n > 0, a(0)=1. - Paul Barry, Aug 26 2004
D-finite with recurrence a(n) = (2*n-1)*a(n-1) + (2*n-2)*a(n-2). - Elizabeth McMahon, Gary Gordon (mcmahone(AT)lafayette.edu), Jun 29 2009
From Groux Roland, Jan 17 2011: (Start)
a(n) = (1/(2*sqrt(exp(1))))*Integral_{x>=-1} exp(-x/2)*x^n dx;
Sum_{k>=0} 1/(k!*2^(k+1)*(n+k+1)) = (-1)^n*(a(n)*sqrt(exp(1))-2^n*n!). (End)
a(n) = round(2^n*n!/exp(1/2)), x >= 0. - Simon Plouffe, Mar 1993
G.f.: 1/Q(0), where Q(k) = 1 - x*(4*k+1) - 4*x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Sep 30 2013
From Peter Bala, Jan 30 2015: (Start)
a(n) = Integral_{x = 0..inf} (2*x - 1)^n*exp(-x) dx.
b(n) := 2^n*n! satisfies the recurrence b(n) = (2*n - 1)*b(n-1) + (2*n - 2)*b(n-2), the same recurrence as satisfied by a(n). This leads to the continued fraction representation a(n) = 2^n*n!*( 1/(1 + 1/(1 + 2/(3 + 4/(5 +...+ (2*n - 2)/(2*n - 1) ))))) for n >= 2, which in the limit gives the continued fraction representation sqrt(e) = 1 + 1/(1 + 2/(3 + 4/(5 + ... ))). (End)
For n > 0, a(n) = 1 + 4*Sum_{k=0..n-1} A263895(n). - Vladimir Reshetnikov, Oct 30 2015
a(n) = (-1)^n*(1-2*n*hypergeom([1,1-n],[],2)). - Peter Luschny, May 09 2017
a(n+1) >= A113012(n). - Michael Somos, Sep 28 2017
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (2*k - 1) * a(n-k). - Ilya Gutkovskiy, Jan 17 2020
a(n) = 2^n*KummerU(-n, -n, -1/2). - Peter Luschny, May 10 2022
a(n) = 2^n*n!*hypergeom([-n], [-n], -1/2). - Peter Luschny, Jul 28 2024

A001539 a(n) = (4*n+1)*(4*n+3).

Original entry on oeis.org

3, 35, 99, 195, 323, 483, 675, 899, 1155, 1443, 1763, 2115, 2499, 2915, 3363, 3843, 4355, 4899, 5475, 6083, 6723, 7395, 8099, 8835, 9603, 10403, 11235, 12099, 12995, 13923, 14883, 15875, 16899, 17955, 19043, 20163, 21315, 22499, 23715, 24963, 26243, 27555, 28899
Offset: 0

Views

Author

Keywords

Comments

Sequence arises from reading the line from 3, in the direction 3, 35, ... in the square spiral whose vertices are the squares A000290. - Omar E. Pol, May 24 2008
log(sqrt(2)+1)/sqrt(2) = 0.62322524... = 2/3 - 2/35 + 2/99 - 2/195 + 2/323, ... = (1 - 1/3) + (1/7 - 1/5) + (1/9 - 1/11) + (1/15 - 1/13) + (1/17 - 1/19) + (1/23 - 1/21) + ... - Gary W. Adamson, Mar 01 2009
Numbers k such that k+1 is a square and k+5 is divisible by 8. - Bruno Berselli, Sep 27 2017
The concatenation of 8*A000217(n) and 99 is a term of the sequence. Example: for A000217(5) = 15, 8*15 = 120 and 12099 = a(27). In general, a(5*n+2) = 800*A000217(n) + 99. - Bruno Berselli, Sep 29 2017

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(3 + 26 x + 3 x^2)/(1 - x)^3, {x, 0, 41}], x] (* or *) Table[(4 n + 1) (4 n + 3), {n, 0, 41}] (* Michael De Vlieger, Sep 29 2017 *)
  • Maxima
    makelist((4*n+1)*(4*n+3), n, 0, 30); /* Martin Ettl, Nov 12 2012 */
    
  • PARI
    a(n)=(4*n+1)*(4*n+3) \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = A016826(n) - 1 = (A001533(n)+5)/4 = (A001538(n)+16)/9.
Sum_{k>=0} 1/a(k) = Pi/8. - Benoit Cloitre, Aug 20 2002
G.f.: (3 + 26*x + 3*x^2)/(1 - x)^3. - Jaume Oliver Lafont, Mar 07 2009
a(n) = 32*n + a(n-1) for n > 0, a(0)=3. - Vincenzo Librandi, Nov 12 2010
a(n) = a(m) + 16*(n-m)*(n+m+1). The previous formula is obtained for m = n-1. - Bruno Berselli, Sep 29 2017
From Amiram Eldar, Feb 19 2023: (Start)
a(n) = A016813(n)*A004767(n).
Product_{n>=0} (1 - 1/a(n)) = sqrt(2)*cos(Pi/(2*sqrt(2))).
Product_{n>=0} (1 + 1/a(n)) = sqrt(2). (End)
From Elmo R. Oliveira, Oct 23 2024: (Start)
E.g.f.: exp(x)*(3 + 16*x*(2 + x)).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A005264 Number of labeled rooted Greg trees with n nodes.

Original entry on oeis.org

1, 3, 22, 262, 4336, 91984, 2381408, 72800928, 2566606784, 102515201984, 4575271116032, 225649908491264, 12187240730230528, 715392567595403520, 45349581052869924352, 3087516727770990992896, 224691760916830871873536
Offset: 1

Views

Author

Keywords

Comments

A rooted Greg tree can be described as a rooted tree with 2-colored nodes where only the black nodes are counted and labeled and the white nodes have at least 2 children. - Christian G. Bower, Nov 15 1999

Examples

			G.f. = x + 3*x^2 + 22*x^3 + 262*x^4 + 4336*x^5 + 91984*x^6 + 2381408*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Inverse Stirling transform of A005172 (hence corrected and extended). - John W. Layman

Programs

  • Maple
    T := proc(n,k) option remember; if k=0 and (n=0 or n=1) then return(1) fi; if k<0 or k>n then return(0) fi;
    (n-1)*T(n-1,k-1)+(3*n-k-4)*T(n-1,k)-(k+1)*T(n-1,k+1) end:
    A005264 := proc(n) add(T(n,k)*(-1)^k*2^(n-k-1), k=0..n-1) end;
    seq(A005264(n),n=1..17); # Peter Luschny, Nov 10 2012
  • Mathematica
    max = 17; f[x_] := -1/2 - ProductLog[-E^(-1/2)*(x + 1)/2]; Rest[ CoefficientList[ Series[ f[x], {x, 0, max}], x]*Range[0, max]!] (* Jean-François Alcover, May 23 2012, after Peter Bala *)
    a[ n_] := If[ n < 1, 0, n! SeriesCoefficient[ InverseSeries[ Series[ Exp[-x] (1 + 2 x) - 1, {x, 0, n}]], n]]; (* Michael Somos, Jun 07 2012 *)
  • Maxima
    a(n):=if n=1 then 1 else sum((n+k-1)!*sum(1/(k-j)!*sum(1/(l!*(j-l)!)*sum(((-1)^(i+l)*l^i*binomial(l,n+j-i-1)*2^(n+j-i-1))/i!,i,0,n+j-1),l,1,j),j,1,k),k,1,n-1); /* Vladimir Kruchinin, May 04 2012 */
    
  • PARI
    {a(n) = local(A); if( n<1, 0, for( k= 1, n, A += x * O(x^k); A = truncate( (1 + x) * exp(A) - 1 - A) ); n! * polcoeff( A, n))}; /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n) = if( n<1, 0, n! * polcoeff( serreverse( exp( -x + x * O(x^n) ) * (1 + 2*x) - 1), n))}; /* Michael Somos, Mar 26 2011 */
    
  • Sage
    @CachedFunction
    def T(n,k):
        if k==0 and (n==0 or n==1): return 1
        if k<0 or k>n: return 0
        return (n-1)*T(n-1,k-1)+(3*n-k-4)*T(n-1,k)-(k+1)*T(n-1,k+1)
    A005264 = lambda n: add(T(n,k)*(-1)^k*2^(n-k-1) for k in (0..n-1))
    [A005264(n) for n in (1..17)]  # Peter Luschny, Nov 10 2012

Formula

Exponential reversion of A157142 with offset 1. - Michael Somos, Mar 26 2011
The REVEGF transform of the odd numbers [1,3,5,7,9,11,...] is [1, -3, 22, -262, 4336, -91984, 2381408, ...] - N. J. A. Sloane, May 26 2017
E.g.f. A(x) = y satisfies y' = (1 + 2*y) / ((1 - 2*y) * (1 + x)). - Michael Somos, Mar 26 2011
E.g.f. A(x) satisfies (1 + x) * exp(A(x)) = 1 + 2 * A(x).
From Peter Bala, Sep 08 2011: (Start)
A(x) satisfies the separable differential equation A'(x) = exp(A(x))/(1-2*A(x)) with A(0) = 0. Thus the inverse function A^-1(x) = int {t = 0..x} (1-2*t)/exp(t) = exp(-x)*(2*x+1)-1 = x-3*x^2/2!+5*x^3/3!-7*x^4/4!+.... A(x) = -1/2-LambertW(-exp(-1/2)*(x+1)/2).
The expansion of A(x) can be found by inverting the above integral using the method of [Dominici, Theorem 4.1] to arrive at the result a(n) = D^(n-1)(1) evaluated at x = 0, where D denotes the operator g(x) -> d/dx(exp(x)/(1-2*x)*g(x)). Compare with [Dominici, Example 9].
(End)
a(n)=sum(k=1..n-1, (n+k-1)!*sum(j=1..k, 1/(k-j)!*sum(l=1..j, 1/(l!*(j-l)!)* sum(i=0..n+j-1, ((-1)^(i+l)*l^i*binomial(l,n+j-i-1)*2^(n+j-i-1))/i!)))), n>1, a(1)=1. - Vladimir Kruchinin, May 04 2012
Let T(n,k) = 1 if k=0 and (n=0 or n=1); T(n,k) = 0 if k<0 or k>n; and otherwise T(n,k) = (n-1)*T(n-1,k-1)+(3*n-k-4)*T(n-1,k)-(k+1)*T(n-1,k+1). Define polynomials p(n,w) = w^n*sum_{k=0..n-1}(T(n,k)*w^k)/(1+w)^(2*n-1), then a(n) = (-1)^n*p(n,-1/2). - Peter Luschny, Nov 10 2012
a(n) ~ n^(n-1) / (sqrt(2) * exp(n/2) * (2-exp(1/2))^(n-1/2)). - Vaclav Kotesovec, Jul 09 2013
E.g.f.: -W(-(1+x)*exp(-1/2)/2)-1/2 where W is the Lambert W function. - Robert Israel, Mar 28 2017

A007509 Numerator of Sum_{k=0..n} (-1)^k/(2*k+1).

Original entry on oeis.org

1, 2, 13, 76, 263, 2578, 36979, 33976, 622637, 11064338, 11757173, 255865444, 1346255081, 3852854518, 116752370597, 3473755390832, 3610501179557, 3481569435902, 133330680156299, 129049485078524, 5457995496252709, 227848175409504262, 234389556075339277
Offset: 0

Views

Author

Keywords

Comments

Denominators of convergents to 4/Pi. [For Brouncker's continued fraction, with numerators A025547(n+1), for n >= 0. - Wolfdieter Lang, Aug 26 2019]
See A352395 (the denominators for the present sequence) for the formula of this alternating sum, and the Abramowitz-Stegun link. - Wolfdieter Lang, Apr 06 2022

Examples

			1/1, 2/3, 13/15, 76/105, 263/315, 2578/3465, 36979/45045, 33976/45045, 622637/765765, ...
		

References

  • P. Beckmann, A History of Pi. Golem Press, Boulder, CO, 2nd ed., 1971, p. 131.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Denominators are given in A352395.
From Johannes W. Meijer, Nov 12 2009: (Start)
Cf. A157142 and A166107.
Appears in A167576, A167577, A167578, A024199, A167588 and A167589. (End)
Cf. A142969 for the numerators of Brouncker's continued fraction of 4/Pi - 1.

Programs

  • Magma
    [Numerator(&+[(-1)^k/(2*k+1):k in [0..n]]): n in [0..23]]; // Marius A. Burtea, Aug 26 2019
  • Maple
    A007509 := n->numer(add((-1)^k/(2*k+1),k=0..n));
  • Mathematica
    Table[Numerator[FunctionExpand[(Pi + (-1)^n(HarmonicNumber[n/2 + 1/4] - HarmonicNumber[n/2 - 1/4]))/4]], {n, 0, 20}] (* Vladimir Reshetnikov, Jan 18 2011 *)
    Numerator[Table[Sum[(-1)^k/(2k+1),{k,0,n}],{n,0,30}]] (* Harvey P. Dale, Oct 22 2011 *)
    Table[(-1)^k/(2k+1),{k,0,30}]//Accumulate//Numerator (* Harvey P. Dale, May 03 2019 *)

Formula

a(n) = numerator((Psi(n + 3/2) - Psi((2*n - (-1)^n)/4 + 1) - log(2) + Pi/2)/2), with the digamma function Psi(z). See the formula in A352395. - Wolfdieter Lang, Apr 06 2022
a(n) = numerator(Pi/4 + (-1)^n * (Psi((n + 5/2)/2) - Psi((n + 3/2)/2))/4). - Vaclav Kotesovec, May 16 2022

Extensions

Crossref. corrected (A025547 replaced with A352395) by Wolfdieter Lang, Apr 06 2022

A084930 Triangle of coefficients of Chebyshev polynomials T_{2n+1} (x).

Original entry on oeis.org

1, -3, 4, 5, -20, 16, -7, 56, -112, 64, 9, -120, 432, -576, 256, -11, 220, -1232, 2816, -2816, 1024, 13, -364, 2912, -9984, 16640, -13312, 4096, -15, 560, -6048, 28800, -70400, 92160, -61440, 16384, 17, -816, 11424, -71808, 239360, -452608, 487424, -278528, 65536, -19, 1140, -20064, 160512, -695552
Offset: 0

Views

Author

Gary W. Adamson, Jun 12 2003

Keywords

Comments

From Herb Conn, Jan 28 2005: (Start)
"Letting x = 2 Cos 2A, we have the following trigonometric identities:
"Sin 3A = 3*Sin A - 4*Sin^3 A
"Sin 5A = 5*Sin A - 20*Sin^3 A + 16*Sin^5 A
"Sin 7A = 7*Sin A - 56*Sin^3 A + 112*Sin^5 A - 64*Sin^7 A
"Sin 9A = 9*Sin A - 120*Sin^3 A + 432*Sin^5 A - 576*Sin^7 A + 256*Sin^9 A, etc." (End)
Cayley (1876) states "Write sin u = x, then we have sin u = x, [...] sin 3u = 3x - 4x^3, [...] sin 5u = 5x - 20x^3 + 16 x^5, [...]". Since T_n(cos(u)) = cos(nu) for all integer n, sin(u) = cos(u - Pi/2), and sin(u + k*Pi) = (-1)^k sin(u) it follows that T_n(sin(u)) = (-1)^((n-1)/2) sin(nu) for all odd integer n. - Michael Somos, Jun 19 2012
From Wolfdieter Lang, Aug 05 2014: (Start)
The coefficient triangle t(n,k) for the row polynomials Todd(n, x) := T_{2*n+1}(sqrt(x))/sqrt(x) = sum(t(n,k)*x^k, k=0..n) is the Riordan triangle ((1-z)/(1+z)^2, 4*z/(1+z)^2) (rewrite the g.f. for the present triangle a(n,k) given in the formula section). The triangle entries t(n,k) = a(n,k), but the interpretation of the row polynomials is different for both cases.
From the relation Todd(n, x) = S(n, 2*(2*x-1)) - S(n-1, 2*(2*x-1)) with the Chebyshev S-polynomials (see A049310 and the formula section of A130777) follows the recurrence: Todd(n, x) = 2*(-1)^n*(1-x)*Todd(n-1, 1-x) + (2x-1)*Todd(n-1, x), n >= 1, Todd(0, x) = 1.
This corresponds to the triangle recurrence t(n,k) = (2*(k+1)*(-1)^(n-k) - 1)*t(n-1,k) + 2*(1 +(-1)^(n-k))*t(n-1,k-1) + 2*(-1)^(n-k)*sum(binomial(l+1,k)*t(n-1,l), l=k+1..n-1), n >= k >= 1, t(n,k) = 0 if n < k, t(n,0) = (-1)^n*(2*n+1). Compare this with the shorter recurrence involving the rational A-sequence for this Riordan triangle which has g.f. x^2/(2-x-2*sqrt(1-x)). t(n,k) = sum(A(j)*t(n-1,k-1+j), j=0..n-k), n >= k >= 1. The Z-sequence has g.f. -(1 + 2/sqrt(1-x)). For the A- and Z-sequence see a link under A006232. (End)

Examples

			The triangle a(n,k):
n   2n+1\k 0     1      2       3       4        5        6         7        8        9      10 ...
0    1:    1
1    3:   -3     4
2    5:    5   -20     16
3    7:   -7    56   -112      64
4    9:    9  -120    432    -576     256
5   11:  -11   220  -1232    2816   -2816     1024
6   13:   13  -364   2912   -9984   16640   -13312     4096
7   15:  -15   560  -6048   28800  -70400    92160   -61440     16384
8   17:   17  -816  11424  -71808  239360  -452608   487424   -278528    65536
9   19:  -19  1140 -20064  160512 -695552  1770496 -2723840   2490368 -1245184   262144
10  21:   21 -1540  33264 -329472 1793792 -5870592 12042240 -15597568 12386304 -5505024 1048576
... formatted and extended by _Wolfdieter Lang_, Aug 02 2014.
---------------------------------------------------------------------------------------------------
First few polynomials T_{2n+1}(x) are
1*x - 3*x + 4*x^3
5*x - 20*x^3 + 16*x^5
- 7*x + 56*x^3 - 112*x^5 + 64*x^7
9*x - 120*x^3 + 432*x^5 - 576*x^7  + 256*x^9
		

References

  • A. Cayley, On an Expression for 1 +- sin(2p+1)u in Terms of sin u, Messenger of Mathematics, 5 (1876), pp. 7-8 = Mathematical Papers Vol. 10, n. 630, pp. 1-2.
  • Theodore J. Rivlin, Chebyshev polynomials: from approximation theory to algebra and number theory, 2nd ed., Wiley, New York, 1990. p. 37, eq. (1.96) and p. 4, eq. (1.10).

Crossrefs

Cf. A053120 (coefficient triangle of T-polynomials), A127674 (even-indexed T polynomials).
Cf. A127675 (row reversed triangle with different signs).

Programs

  • Mathematica
    row[n_] := (T = ChebyshevT[2*n+1, x]; Coefficient[T, x, #]& /@ Range[1, Exponent[T, x], 2]); Table[row[n], {n, 0, 9} ] // Flatten (* Jean-François Alcover, Aug 06 2014 *)

Formula

Alternate rows of A008310.
a(n,k)=((-1)^(n-k))*(2^(2*k))*binomial(n+1+k,2*k+1)*(2*n+1)/(n+1+k) if n>=k>=0 else 0.
From Wolfdieter Lang, Aug 02 2014: (Start)
a(n,k) = [x^(2*k+1)] T_{2*n+1}(x), n >= k >= 0.
G.f. for row polynomials: x*(1-z)/(1 + 2*(1- 2*x^2)*z + z^2). (End)
The first column sequences are: A157142, 4*(-1)^(n+1)*A000330(n), 16*(-1)^n*A005585(n-1), 64*(-1)^(n+1)*A050486(n-3), 256*(-1)^n*A054333(n-4), ... - Wolfdieter Lang, Aug 05 2014

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Jun 26 2003
Edited; example rewritten (to conform with the triangle) by Wolfdieter Lang, Aug 02 2014

A100218 Riordan array ((1-2*x)/(1-x), (1-x)).

Original entry on oeis.org

1, -1, 1, -1, -2, 1, -1, 0, -3, 1, -1, 0, 2, -4, 1, -1, 0, 0, 5, -5, 1, -1, 0, 0, -2, 9, -6, 1, -1, 0, 0, 0, -7, 14, -7, 1, -1, 0, 0, 0, 2, -16, 20, -8, 1, -1, 0, 0, 0, 0, 9, -30, 27, -9, 1, -1, 0, 0, 0, 0, -2, 25, -50, 35, -10, 1, -1, 0, 0, 0, 0, 0, -11, 55, -77, 44, -11, 1, -1, 0, 0, 0, 0, 0, 2, -36, 105, -112, 54, -12, 1
Offset: 0

Views

Author

Paul Barry, Nov 08 2004

Keywords

Examples

			Triangle begins as:
   1;
  -1,  1;
  -1, -2,  1;
  -1,  0, -3,  1;
  -1,  0,  2, -4,  1;
  -1,  0,  0,  5, -5,   1;
  -1,  0,  0, -2,  9,  -6,   1;
  -1,  0,  0,  0, -7,  14,  -7,  1;
  -1,  0,  0,  0,  2, -16,  20, -8,  1;
  -1,  0,  0,  0,  0,   9, -30, 27, -9,  1;
		

Crossrefs

Row sums are A100219.
Matrix inverse of A100100.
Apart from signs, same as A098599.
Very similar to triangle A111125.

Programs

  • Magma
    A100218:= func< n,k | n eq 0 select 1 else (-1)^(n+k)*(Binomial(k,n-k) + Binomial(k-1,n-k-1)) >;
    [A100218(n,k): k in [0..n], n in [0..13]]; // G. C. Greubel, Mar 28 2024
    
  • Mathematica
    T[0,0]:= 1; T[1,1]:= 1; T[1,0]:= -1; T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, T[n- 1,k] +T[n-1,k-1] -2*T[n-2,k-1] +T[n-3,k-1]]; Table[T[n,k], {n,0,14}, {k,0,n} ]//Flatten (* G. C. Greubel, Mar 13 2017 *)
  • SageMath
    def A100218(n,k): return 1 if n==0 else (-1)^(n+k)*(binomial(k,n-k) + binomial(k-1,n-k-1))
    flatten([[A100218(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Mar 28 2024

Formula

Sum_{k=0..n} T(n, k) = A100219(n) (row sums).
Number triangle T(n, k) = (-1)^(n-k)*(binomial(k, n-k) + binomial(k-1, n-k-1)), with T(0, 0) = 1. - Paul Barry, Nov 09 2004
T(n,k) = T(n-1,k) + T(n-1,k-1) - 2*T(n-2,k-1) + T(n-3,k-1), T(0,0)=1, T(1,0)=-1, T(1,1)=1, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Jan 09 2014
From G. C. Greubel, Mar 28 2024: (Start)
T(n, n-1) = A000027(n), n >= 1.
T(n, n-2) = -A080956(n-1), n >= 2.
T(2*n, n) = A280560(n).
T(2*n-1, n) = A157142(n-1), n >= 1.
T(2*n+1, n) = -A000007(n) = A154955(n+2).
T(3*n, n) = T(4*n, n) = A000007(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A355021(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^n*A098601(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = -1 + 2*A077961(n) + A077961(n-2). (End)
From Peter Bala, Apr 28 2024: (Start)
This Riordan array has the form ( x*h'(x)/h(x), h(x) ) with h(x) = x*(1 - x) and hence belongs to the hitting time subgroup of the Riordan group (see Peart and Woan for properties of this subgroup).
T(n,k) = [x^(n-k)] (1/c(x))^n, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. In general the (n, k)-th entry of the hitting time array ( x*h'(x)/h(x), h(x) ) has the form [x^(n-k)] f(x)^n, where f(x) = x/( series reversion of h(x) ). (End)

A166107 A sequence related to the Madhava-Gregory-Leibniz formula for Pi.

Original entry on oeis.org

2, -10, 46, -334, 982, -10942, 140986, -425730, 7201374, -137366646, 410787198, -9473047614, 236302407090, -710245778490, 20563663645710, -638377099140510, 1912749274005030, -67020067316087550, 2477305680740159850
Offset: 0

Views

Author

Johannes W. Meijer, Oct 06 2009, Feb 26 2013, Mar 02 2013

Keywords

Comments

The EG1 matrix is defined in A162005. The first column of this matrix leads to the function PLS(z) = sum(2*eta(2*m-1)*z^(2*m-2), m=1..infinity) = 2*log(2) - Psi(z) - Psi(-z) + Psi(z/2) + Psi(-z/2). The values of this function for z=n+1/2 are related to Pi in a curious way.
Gauss's digamma theorem leads to PLS(z=n+1/2) = (-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1). Now we define PLS(z=n+1/2) = a(n)/p(n) with a(n) the sequence given above and for p(n) we choose the esthetically nice p(n) = (2*n-1)!!/(floor((n-2)/3)*2+1)!!, n=>0. For even values of n the limit(a(2*n)/p(2*n), n=infinity) = Pi and for odd values of n the limit(a(2*n+1)/p(2*n+1), n=infinity) = - Pi. We observe that the a(n)/p(n) formulas resemble the partial sums of the Madhava-Gregory-Leibniz series for Pi = 4*(1-1/3+1/5-1/7+ ...), see the examples. The 'extra term' that appears in the a(n)/p(n) formulas, i.e., 2/(2*n+1), speeds up the convergence of abs(a(n)/p(n)) significantly. The first appearance of a digit in the decimal expansion of Pi occurs here for n: 1, 3, 9, 30, 74, 261, 876, 3056, .., cf. A126809. [Comment modified by the author, Oct 09 2009]

Examples

			The first few values of a(n)/p(n) are: a(0)/p(0) = 2/1; a(1)/p(1) = - 4*(1) + 2/3 = -10/3; a(2)/p(2) = 4*(1-1/3) + 2/5 = 46/15; a(3)/p(3) = - 4*(1-1/3+1/5) + 2/7 = - 334/105; a(4)/p(4)= 4*(1-1/3+1/5-1/7) + 2/9 = 982/315; a(5)/p(5) = - 4*(1-1/3+1/5-1/7+1/9) + 2/11 = -10942/3465; a(6)/p(6) = 4*(1-1/3+1/5-1/7+1/9-1/11) + 2/13 = 140986/45045; a(7)/p(7) = - 4*(1-1/3+1/5-1/7+1/9-1/11+1/13) + 2/15 = - 425730/135135.
		

Crossrefs

Programs

  • Maple
    A166107 := n -> A220747 (n)*((-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1)): A130823 := n -> floor((n-1)/3)*2+1: A220747 := n -> doublefactorial(2*n+1) / doublefactorial(A130823(n)): seq(A166107(n), n=0..20);

Formula

a(n) = p(n)*(-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1) with
p(n) = doublefactorial(2*n+1)/doublefactorial(floor((n-1)/3)*2+1) = A220747(n)
PLS(z) = 2*log(2) - Psi(z) - Psi(-z) + Psi(z/2) + Psi(-z/2)
PLS(z=n+1/2) = a(n)/p(n) = (-1)^n*4*sum((-1)^(k+1)/(2*k-1), k=1..n) + 2/(2*n+1)
PLS(z=2*n+5/2) - PLS(z=2*n+1/2) = 2/(4*n+5) - 4/(4*n+3) + 2/(4*n+1) which leads to:
Pi = 2 + 16 * sum(1/((4*n+5)*(4*n+3)*(4*n+1)), n=0 .. infinity).
PLS (z=2*n +7/2) - PLS(z=2*n+3/2) = 2/(4*n+7) - 4/(4*n+5) + 2/(4*n+3) which leads to:
Pi = 10/3 - 16*sum(1/((4*n+7)*(4*n+5)*(4*n+3)), n=0 .. infinity).
The combination of these two formulas leads to:
Pi = 8/3 + 48* sum(1/((4*n+7)*(4*n+5)*(4*n+3)*(4*n+1)), n=0 .. infinity).

A154633 a(n) = (4*n+1)*(4*n+3)*(4*n+5)*(4*n+7).

Original entry on oeis.org

105, 3465, 19305, 62985, 156009, 326025, 606825, 1038345, 1666665, 2544009, 3728745, 5285385, 7284585, 9803145, 12924009, 16736265, 21335145, 26822025, 33304425, 40896009, 49716585, 59892105, 71554665, 84842505, 99900009, 116877705, 135932265, 157226505, 180929385
Offset: 0

Views

Author

Jaume Oliver Lafont, Jan 13 2009

Keywords

Comments

3 divides a(n).
For n=5k, 5k+1, 5k+2 and 5k+3, a(n) is a multiple of 5. For n=5k+4, a(n)-9 is a multiple of 100. - Michel Marcus, Aug 21 2013

Crossrefs

Programs

  • Mathematica
    a[n_] := (4*n + 1)*(4*n + 3)*(4*n + 5)*(4*n + 7); Array[a, 40, 0] (* Amiram Eldar, Feb 27 2022 *)
  • PARI
    a(n) = (4*n+1)*(4*n+3)*(4*n+5)*(4*n+7); \\ Michel Marcus, Aug 21 2013

Formula

Sum_{n>=0} 1/a(n) = (3*Pi - 8)/144.
G.f.: 3*(35 + 980*x + 1010*x^2 + 20*x^3 + 3*x^4)/(1-x)^5.
a(n) = (4*n+1)*(4*n+3)*(4*n+5)*(4*n+7).
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
Sum_{n>=0} (-1)^n/a(n) = 1/18 - Pi/(48*sqrt(2)). - Amiram Eldar, Feb 27 2022

A030640 Discriminant of lattice A_n of determinant n+1.

Original entry on oeis.org

1, 1, -3, -2, 5, 3, -7, -4, 9, 5, -11, -6, 13, 7, -15, -8, 17, 9, -19, -10, 21, 11, -23, -12, 25, 13, -27, -14, 29, 15, -31, -16, 33, 17, -35, -18, 37, 19, -39, -20, 41, 21, -43, -22, 45, 23, -47, -24, 49, 25, -51, -26, 53, 27, -55, -28, 57, 29, -59
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 1 + x - 3*x^2 - 2*x^3 + 5*x^4 + 3*x^5 - 7*x^6 - 4*x^7 + 8*x^9 + 5*x^10 + ...
		

References

  • J. H. Conway, The Sensual Quadratic Form, Mathematical Association of America, 1997, p. 4.
  • G. L. Watson, Integral Quadratic Forms, Cambridge University Press, p. 2.

Crossrefs

Cf. A026741 is unsigned version.

Programs

  • Mathematica
    CoefficientList[Series[(1+x-x^2)/(1+x^2)^2,{x,0,60}],x] (* or *) LinearRecurrence[{0,-2,0,-1},{1,1,-3,-2},70]
    a[ n_] := With[{m = n + 1}, m I^m / If[ Mod[ m, 2] == 1, I, -2]]; (* Michael Somos, Jun 11 2013 *)
  • PARI
    {a(n) = if( n==-1, 0, (-1)^(n\2) * (n+1) / gcd(n+1, 2))}; /* Michael Somos, Jun 15 2005 */
    
  • Python
    def A030640(n): return (-(n+1>>1) if n&2 else n+1>>1) if n&1 else (-n-1 if n&2 else n+1) # Chai Wah Wu, Aug 05 2024

Formula

a(2n) = (-1)^n*(2*n+1), a(2n+1) = (-1)^n*(n+1). Or (apart from signs and with offset 1), a(n) = n, n odd; n/2, n even.
G.f.: (1+x-x^2)/(1+x^2)^2. - Len Smiley
a(-2-n) = (-1)^n * a(n). - Michael Somos, Jun 15 2005
a(n) = -2*a(n-2) - a(n-4); a(0)=1, a(1)=1, a(2)=-3, a(3)=-2. - Harvey P. Dale, Dec 02 2011
a(n) = (-1)^floor(n/2)*A026741(n+1).
a(2*n) = A157142(n). a(2*n - 1) = A181983(n). - Michael Somos, Feb 22 2016
Showing 1-10 of 14 results. Next