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-4 of 4 results.

A105522 Inverse of number triangle A105438.

Original entry on oeis.org

1, -2, 1, 1, -2, 1, 2, 0, -2, 1, -2, 4, -1, -2, 1, -4, -1, 6, -2, -2, 1, 5, -10, 1, 8, -3, -2, 1, 10, 4, -18, 4, 10, -4, -2, 1, -14, 28, 0, -28, 8, 12, -5, -2, 1, -28, -14, 56, -8, -40, 13, 14, -6, -2, 1, 42, -84, -6, 96, -21, -54, 19, 16, -7, -2, 1, 84, 48, -180, 15, 150, -40, -70, 26, 18, -8, -2, 1, -132, 264, 33, -330, 55, 220, -66
Offset: 0

Views

Author

Paul Barry, Apr 11 2005

Keywords

Comments

Row sums A105523 have g.f. 1-xc(-x^2) where c(x) is the g.f. of A000108. Diagonal sums are A105524.

Examples

			Rows begin {1}, {-2, 1}, {1, -2, 1}, {2, 0, -2, 1}, {-2, 4, -1, -2, 1}, ...
		

Formula

Riordan array ((1+2x+4x^2-(1+2x)sqrt(1+4x^2))/(2x^2), (sqrt(1+4x^2)-1)/(2x))

A105523 Expansion of 1-x*c(-x^2) where c(x) is the g.f. of A000108.

Original entry on oeis.org

1, -1, 0, 1, 0, -2, 0, 5, 0, -14, 0, 42, 0, -132, 0, 429, 0, -1430, 0, 4862, 0, -16796, 0, 58786, 0, -208012, 0, 742900, 0, -2674440, 0, 9694845, 0, -35357670, 0, 129644790, 0, -477638700, 0, 1767263190, 0
Offset: 0

Views

Author

Paul Barry, Apr 11 2005

Keywords

Comments

Row sums of A105522. Row sums of inverse of A105438.
First column of number triangle A106180.

Examples

			G.f. = 1 - x + x^3 - 2*x^5 + 5*x^7 - 14*x^9 + 42*x^11 - 132*x^13 + 429*x^15 + ...
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!((1 + 2*x - Sqrt(1+4*x^2))/(2*x))); // G. C. Greubel, Sep 16 2018
  • Maple
    A105523_list := proc(n) local j, a, w; a := array(0..n); a[0] := 1;
    for w from 1 to n do a[w]:=-a[w-1]+(-1)^w*add(a[j]*a[w-j-1],j=1..w-1) od; convert(a,list)end: A105523_list(40); # Peter Luschny, May 19 2011
  • Mathematica
    a[n_?EvenQ] := 0; a[n_?OddQ] := 4^n*Gamma[n/2] / (Gamma[-n/2]*(n+1)!); a[0] = 1; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 14 2011, after Vladimir Kruchinin *)
    CoefficientList[Series[(1 + 2 x - Sqrt[1 + 4 x^2])/(2 x), {x, 0, 50}], x] (* Vincenzo Librandi, Nov 01 2014 *)
    a[ n_] := SeriesCoefficient[ (1 + 2 x - Sqrt[ 1 + 4 x^2]) / (2 x), {x, 0, n}]; (* Michael Somos, Jun 17 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], a[n] = -2 a[n - 1] + Sum[ a[j] a[n - j - 1], {j, 0, n - 1}]]; (* Michael Somos, Jun 17 2015 *)
  • PARI
    {a(n) = local(A); if( n<0, 0, n++; A = vector(n); A[1] = 1; for( k=2, n, A[k] = -2 * A[k-1] + sum( j=1, k-1, A[j] * A[k-j])); A[n])}; /* Michael Somos, Jul 24 2011 */
    
  • Sage
    def A105523(n):
        if is_even(n): return 0 if n>0 else 1
        return -(sqrt(pi)*2^(n-1))/(gamma(1-n/2)*gamma((n+3)/2))
    [A105523(n) for n in (0..29)] # Peter Luschny, Oct 31 2014
    

Formula

G.f.: (1 + 2*x - sqrt(1+4*x^2))/(2*x).
a(n) = 0^n + sin(Pi*(n-2)/2)(C((n-1)/2)(1-(-1)^n)/2).
G.f.: 1/(1+x/(1-x/(1+x/(1-x/(1+x/(1-x.... (continued fraction). - Paul Barry, Jan 15 2009
a(n) = Sum{k = 0..n} A090181(n,k)*(-1)^k. - Philippe Deléham, Feb 02 2009
a(n) = (1/n)*sum_{i = 0..n-1} (-2)^i*binomial(n, i)*binomial(2*n-i-2, n-1). - Vladimir Kruchinin, Dec 26 2010
With offset 1, a(n) = -2 * a(n-1) + Sum_{k=1..n-1} a(k) * a(n-k), for n>1. - Michael Somos, Jul 25 2011
D-finite with recurrence: (n+3)*a(n+2) = -4*n*a(n), a(0)=1, a(1)=-1. - Fung Lam, Mar 18 2014
For nonzero terms, a(n) ~ (-1)^((n+1)/2)/sqrt(2*Pi)*2^(n+1)/(n+1)^(3/2). - Fung Lam, Mar 17 2014
a(n) = -(sqrt(Pi)*2^(n-1))/(Gamma(1-n/2)*Gamma((n+3)/2)) for n odd. - Peter Luschny, Oct 31 2014
From Peter Bala, Apr 20 2024: (Start)
a(n) = Sum_{k = 0..n} (-2)^(n-k)*binomial(n + k, 2*k)*Catalan(k), where Catalan(k) = A000108(k).
a(n) = (-2)^n * hypergeom([-n, n+1], [2], 1/2).
O.g.f.: A(x) = 1/x * series reversion of x*(1 - x)/(1 - 2*x). Cf. A152681. (End)

Extensions

Typo in definition corrected by Robert Israel, Oct 31 2014

A221074 Simple continued fraction expansion of product {n >= 0} {1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+3)}/{1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+1)} at m = 3.

Original entry on oeis.org

2, 8, 1, 16, 1, 96, 1, 176, 1, 968, 1, 1760, 1, 9600, 1, 17440, 1, 95048, 1, 172656, 1, 940896, 1, 1709136, 1, 9313928, 1, 16918720, 1, 92198400, 1, 167478080, 1, 912670088, 1, 1657862096, 1
Offset: 0

Views

Author

Peter Bala, Jan 06 2013

Keywords

Comments

Simple continued fraction expansion of product {n >= 0} {1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+3)}/{1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+1)} at m = 3. For other cases see A221073 (m = 2), A221075 (m = 4) and A221076 (m = 5).

Examples

			Product {n >= 0} {1 - sqrt(3)*(sqrt(3) - sqrt(2))^(4*n+3)}/{1 - sqrt(3)*(sqrt(3) - sqrt(2))^(4*n+1)} = 2.11180 16361 44098 52896 ...
= 2 + 1/(8 + 1/(1 + 1/(16 + 1/(1 + 1/(96 + 1/(1 + 1/(176 + ...))))))).
Since (sqrt(3) - sqrt(2))^3 = 9*sqrt(3) - 11*sqrt(2) we have the following simple continued fraction expansion:
product {n >= 0} {1 - sqrt(3)*(9*sqrt(3) - 11*sqrt(2))^(4*n+3)}/{1 - sqrt(3)*(9*sqrt(3) - 11*sqrt(2))^(4*n+1)} = 1 + 1/(16 + 1/(1 + 1/(968 + 1/(1 + 1/(17440 + 1/(1 + 1/(940896 + ...))))))).
		

Crossrefs

Cf. A098297, A105438, A132596, A174500, A221073 (m = 2), A221075 (m = 4), A221076 (m = 5).

Formula

a(2*n) = 1 for n >= 1. For n >= 1 we have
a(4*n - 3) = (sqrt(3) + sqrt(2))^(2*n) + (sqrt(3) - sqrt(2))^(2*n) - 2;
a(4*n - 1) = 1/sqrt(3)*{(sqrt(3) + sqrt(2))^(2*n + 1) + (sqrt(3) - sqrt(2))^(2*n + 1)} - 2.
a(4*n - 3) = 8*A098297(n) = 4*A132596(n); a(4*n - 1) = 4*A105038(n).
O.g.f.: 2 + x^2/(1 - x^2) + 8*x*(1 + x^2)^2/(1 - 11*x^4 + 11*x^8 - x^12) = 2 + 8*x + x^2 + 16*x^3 + x^4 + 96*x^5 + ....
If we denote the present sequence by [2; 8, 1, c(3), 1, c(4), 1, ...] then for k >= 1 the sequence [1; c(2*k+1), 1, c(2*(2*k+1)), 1, c(3*(2*k+1)), 1, ...] gives the simple continued fraction expansion of product {n >= 0} [1-sqrt(3)*{(sqrt(3)-sqrt(2))^(2*k+1)}^(4*n+3)]/[1 - sqrt(3)*{(sqrt(3)-sqrt(2))^(2*k+1)}^(4*n+1)]. An example is given below.
O.g.f.: (x^10-2*x^8-10*x^6+20*x^4-8*x^3+x^2-8*x-2) / ((x-1)*(x+1)*(x^8-10*x^4+1)). - Colin Barker, Jan 10 2014

A345123 Number T(n,k) of ordered subsequences of {1,...,n} containing at least k elements and such that the first differences contain only odd numbers; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 7, 6, 3, 1, 12, 11, 7, 3, 1, 20, 19, 14, 8, 3, 1, 33, 32, 26, 17, 9, 3, 1, 54, 53, 46, 34, 20, 10, 3, 1, 88, 87, 79, 63, 43, 23, 11, 3, 1, 143, 142, 133, 113, 83, 53, 26, 12, 3, 1, 232, 231, 221, 196, 156, 106, 64, 29, 13, 3, 1, 376, 375, 364, 334, 279, 209, 132, 76, 32, 14, 3, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 08 2021

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order 2k if k >= 2 and of order 3 for k in {0, 1}.

Examples

			T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,2) = 1: [1,2].
T(3,1) = 6: [1], [2], [3], [1,2], [2,3], [1,2,3].
T(4,0) = 12: [], [1], [2], [3], [4], [1,2], [1,4], [2,3], [3,4], [1,2,3], [2,3,4], [1,2,3,4].
T(6,3) = 17: [1,2,3], [1,2,5], [1,4,5], [2,3,4], [2,3,6], [2,5,6], [3,4,5], [4,5,6], [1,2,3,4], [1,2,3,6], [1,2,5,6], [1,4,5,6], [2,3,4,5], [3,4,5,6], [1,2,3,4,5], [2,3,4,5,6], [1,2,3,4,5,6].
Triangle T(n,k) begins:
    1;
    2,   1;
    4,   3,   1;
    7,   6,   3,   1;
   12,  11,   7,   3,   1;
   20,  19,  14,   8,   3,   1;
   33,  32,  26,  17,   9,   3,  1;
   54,  53,  46,  34,  20,  10,  3,  1;
   88,  87,  79,  63,  43,  23, 11,  3,  1;
  143, 142, 133, 113,  83,  53, 26, 12,  3, 1;
  232, 231, 221, 196, 156, 106, 64, 29, 13, 3, 1;
  ...
		

References

  • Chu, Hung Viet, Various Sequences from Counting Subsets, Fib. Quart., 59:2 (May 2021), 150-157.

Crossrefs

Columns k=0-3 give: A000071(n+3), A001911, A001924(n-1), A344004.
T(2n,n) give A340766.

Programs

  • Maple
    b:= proc(n, l, t) option remember; `if`(n=0, `if`(t=0, 1, 0), `if`(0
          in [l, irem(1+l-n, 2)], b(n-1, n, max(0, t-1)), 0)+b(n-1, l, t))
        end:
    T:= (n, k)-> b(n, 0, k):
    seq(seq(T(n, k), k=0..n), n=0..10);
    # second Maple program:
    g:= proc(n, k) option remember; `if`(k>n, 0,
         `if`(k in [0, 1], n^k, g(n-1, k-1)+g(n-2, k)))
        end:
    T:= proc(n, k) option remember;
         `if`(k>n, 0, g(n, k)+T(n, k+1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);
    # third Maple program:
    T:= proc(n, k) option remember; `if`(k>n, 0, binomial(iquo(n+k, 2), k)+
          `if`(k>0, binomial(iquo(n+k-1, 2), k), 0)+T(n, k+1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    T[n_, k_] := T[n, k] = If[k > n, 0, Binomial[Quotient[n+k, 2], k] +
         If[k > 0, Binomial[Quotient[n+k-1, 2], k], 0] + T[n, k+1]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 11}] // Flatten (* Jean-François Alcover, Nov 06 2021, after 3rd Maple program *)
Showing 1-4 of 4 results.