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 11 results. Next

A058622 a(n) = 2^(n-1) - ((1+(-1)^n)/4)*binomial(n, n/2).

Original entry on oeis.org

0, 1, 1, 4, 5, 16, 22, 64, 93, 256, 386, 1024, 1586, 4096, 6476, 16384, 26333, 65536, 106762, 262144, 431910, 1048576, 1744436, 4194304, 7036530, 16777216, 28354132, 67108864, 114159428, 268435456, 459312152, 1073741824, 1846943453
Offset: 0

Views

Author

Yong Kong (ykong(AT)curagen.com), Dec 29 2000

Keywords

Comments

a(n) is the number of n-digit binary sequences that have more 1's than 0's. - Geoffrey Critzer, Jul 16 2009
Maps to the number of walks that end above 0 on the number line with steps being 1 or -1. - Benjamin Phillabaum, Mar 06 2011
Chris Godsil observes that a(n) is the independence number of the (n+1)-folded cube graph; proof is by a Cvetkovic's eigenvalue bound to establish an upper bound and a direct construction of the independent set by looking at vertices at an odd (resp., even) distance from a fixed vertex when n is odd (resp., even). - Stan Wagon, Jan 29 2013
Also the number of subsets of {1,2,...,n} that contain more odd than even numbers. For example, for n=4, a(4)=5 and the 5 subsets are {1}, {3}, {1,3}, {1,2,3}, {1,3,4}. See A014495 when same number of even and odd numbers. - Enrique Navarrete, Feb 10 2018
Also half the number of length-n binary sequences with a different number of zeros than ones. This is also the number of integer compositions of n with nonzero alternating sum, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Also the number of integer compositions of n+1 with alternating sum <= 0, ranked by A345915 (reverse: A345916). - Gus Wiseman, Jul 19 2021

Examples

			G.f. = x + x^2 + 4*x^3 + 5*x^4 + 16*x^5 + 22*x^6 + 64*x^7 + 93*x^8 + ...
From _Gus Wiseman_, Jul 19 2021: (Start)
The a(1) = 1 through a(5) = 16 compositions with nonzero alternating sum:
  (1)  (2)  (3)      (4)      (5)
            (1,2)    (1,3)    (1,4)
            (2,1)    (3,1)    (2,3)
            (1,1,1)  (1,1,2)  (3,2)
                     (2,1,1)  (4,1)
                              (1,1,3)
                              (1,2,2)
                              (1,3,1)
                              (2,1,2)
                              (2,2,1)
                              (3,1,1)
                              (1,1,1,2)
                              (1,1,2,1)
                              (1,2,1,1)
                              (2,1,1,1)
                              (1,1,1,1,1)
(End)
		

References

  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.1.7)

Crossrefs

The odd bisection is A000302.
The even bisection is A000346.
The following relate to compositions with nonzero alternating sum:
- The complement is counted by A001700 or A138364.
- The version for alternating sum > 0 is A027306.
- The unordered version is A086543 (even bisection: A182616).
- The version for alternating sum < 0 is A294175.
- These compositions are ranked by A345921.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A345197 counts compositions by length and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Magma
    [(2^n -(1+(-1)^n)*Binomial(n, Floor(n/2))/2)/2: n in [0..40]]; // G. C. Greubel, Aug 08 2022
    
  • Mathematica
    Table[Sum[Binomial[n, Floor[n/2 + i]], {i, 1, n}], {n, 0, 32}] (* Geoffrey Critzer, Jul 16 2009 *)
    a[n_] := If[n < 0, 0, (2^n - Boole[EvenQ @ n] Binomial[n, Quotient[n, 2]])/2]; (* Michael Somos, Nov 22 2014 *)
    a[n_] := If[n < 0, 0, n! SeriesCoefficient[(Exp[2 x] - BesselI[0, 2 x])/2, {x, 0, n}]]; (* Michael Somos, Nov 22 2014 *)
    Table[2^(n - 1) - (1 + (-1)^n) Binomial[n, n/2]/4, {n, 0, 40}] (* Eric W. Weisstein, Mar 21 2018 *)
    CoefficientList[Series[2 x/((1-2x)(1 + 2x + Sqrt[(1+2x)(1-2x)])), {x, 0, 40}], x] (* Eric W. Weisstein, Mar 21 2018 *)
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],ats[#]!=0&]],{n,0,15}] (* Gus Wiseman, Jul 19 2021 *)
  • PARI
    a(n) = 2^(n-1) - ((1+(-1)^n)/4)*binomial(n, n\2); \\ Michel Marcus, Dec 30 2015
    
  • PARI
    my(x='x+O('x^100)); concat(0, Vec(2*x/((1-2*x)*(1+2*x+((1+2*x)*(1-2*x))^(1/2))))) \\ Altug Alkan, Dec 30 2015
    
  • Python
    from math import comb
    def A058622(n): return (1<>1)>>1) if n else 0 # Chai Wah Wu, Aug 25 2025
  • SageMath
    [(2^n - binomial(n, n//2)*((n+1)%2))/2 for n in (0..40)] # G. C. Greubel, Aug 08 2022
    

Formula

a(n) = 2^(n-1) - ((1+(-1)^n)/4)*binomial(n, n/2).
a(n) = Sum_{i=0..floor((n-1)/2)} binomial(n, i).
G.f.: 2*x/((1-2*x)*(1+2*x+((1+2*x)*(1-2*x))^(1/2))). - Vladeta Jovovic, Apr 27 2003
E.g.f: (e^(2x)-I_0(2x))/2 where I_n is the Modified Bessel Function. - Benjamin Phillabaum, Mar 06 2011
Logarithmic derivative of the g.f. of A210736 is a(n+1). - Michael Somos, Nov 22 2014
Even index: a(2n) = 2^(n-1) - A088218(n). Odd index: a(2n+1) = 2^(2n). - Gus Wiseman, Jul 19 2021
D-finite with recurrence n*a(n) +2*(-n+1)*a(n-1) +4*(-n+1)*a(n-2) +8*(n-2)*a(n-3)=0. - R. J. Mathar, Sep 23 2021
a(n) = 2^n-A027306(n). - R. J. Mathar, Sep 23 2021
A027306(n) - a(n) = A126869(n). - R. J. Mathar, Sep 23 2021

A146559 Expansion of (1-x)/(1 - 2*x + 2*x^2).

Original entry on oeis.org

1, 1, 0, -2, -4, -4, 0, 8, 16, 16, 0, -32, -64, -64, 0, 128, 256, 256, 0, -512, -1024, -1024, 0, 2048, 4096, 4096, 0, -8192, -16384, -16384, 0, 32768, 65536, 65536, 0, -131072, -262144, -262144, 0, 524288, 1048576, 1048576, 0, -2097152, -4194304
Offset: 0

Views

Author

Philippe Deléham, Nov 01 2008

Keywords

Comments

Partial sums of this sequence give A099087. - Philippe Deléham, Dec 01 2008
From Philippe Deléham, Feb 13 2013, Feb 20 2013: (Start)
Terms of the sequence lie along the right edge of the triangle
(1)
(1)
2 (0)
2 (-2)
4 0 (-4)
4 -4 (-4)
8 0 -8 (0)
8 -8 -8 (8)
16 0 -16 0 (16)
16 -16 -16 16 (16)
32 0 -32 0 32 (0)
32 -32 -32 32 32 (-32)
64 0 -64 0 64 0 (-64)
...
Row sums of triangle are in A104597.
(1+i)^n = a(n) + A009545(n)*i where i = sqrt(-1). (End)
From Tom Copeland, Nov 08 2014: (Start)
This array is a member of a Catalan family (A091867) related by compositions of C(x)= (1-sqrt(1-4*x))/2, an o.g.f. for the Catalan numbers A000108, its inverse Cinv(x) = x(1-x), and the special linear fractional (Möbius) transformation P(x,t) = x / (1+t*x) with inverse P(x,-t) in x.
O.g.f.: G(x) = P[P[Cinv(x),-1],-1] = P[Cinv(x),-2] = x*(1-x)/(1 - 2*x*(1-x)) = x*A146599(x).
Ginv(x) = C[P(x,2)] = (1 - sqrt(1-4*x/(1+2*x)))/2 = x*A126930(x).
G(-x) = -(x*(1+x) - 2*(x*(1+x))^2 + 2^2*(x*(1+x))^3 - ...), and so this array contains the -row sums of A030528 * Diag(1, (-2)^1, 2^2, (-2)^3, ...).
The inverse of -G(-x) is -C[-P(x,-2)]= (-1 + sqrt(1+4*x/(1-2*x)))/2, an o.g.f. for A210736 with a(0) set to zero there. (End)
{A146559, A009545} is the difference analog of {cos(x), sin(x)}. (Cf. the Shevelev link.) - Vladimir Shevelev, Jun 08 2017

Examples

			G.f. = 1 + x - 2*x^3 - 4*x^4 - 4*x^5 + 8*x^7 + 16*x^8 + 16*x^9 - 32*x^11 - 64*x^12 - ...
		

Crossrefs

Programs

  • Magma
    I:=[1,1,0]; [n le 3 select I[n] else 2*Self(n-1)-2*Self(n-2): n in [1..45]]; // Vincenzo Librandi, Nov 10 2014
    
  • Maple
    G(x):=exp(x)*cos(x): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..44 ); # Zerinvary Lajos, Apr 05 2009
    seq(2^(n/2)*cos(Pi*n/4), n=0..44); # Peter Luschny, Oct 09 2021
  • Mathematica
    CoefficientList[Series[(1-x)/(1-2x+2x^2),{x,0,50}],x] (* or *) LinearRecurrence[{2,-2},{1,1},50] (* Harvey P. Dale, Oct 13 2011 *)
  • PARI
    Vec((1-x)/(1-2*x+2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 11 2012
    
  • Python
    def A146559(n): return ((1, 1, 0, -2)[n&3]<<((n>>1)&-2))*(-1 if n&4 else 1) # Chai Wah Wu, Feb 16 2024
  • Sage
    def A146559():
        x, y = -1, 0
        while True:
            yield -x
            x, y = x - y, x + y
    a = A146559(); [next(a) for i in range(51)]  # Peter Luschny, Jul 11 2013
    
  • SageMath
    def A146559(n): return 2^(n/2)*chebyshev_T(n, 1/sqrt(2))
    [A146559(n) for n in range(51)] # G. C. Greubel, Apr 17 2023
    

Formula

a(0) = 1, a(1) = 1, a(n) = 2*a(n-1) - 2*a(n-2) for n>1.
a(n) = Sum_{k=0..n} A124182(n,k)*(-2)^(n-k).
a(n) = Sum_{k=0..n} A098158(n,k)*(-1)^(n-k). - Philippe Deléham, Nov 14 2008
a(n) = (-1)^n*A009116(n). - Philippe Deléham, Dec 01 2008
E.g.f.: exp(x)*cos(x). - Zerinvary Lajos, Apr 05 2009
E.g.f.: cos(x)*exp(x) = 1+x/(G(0)-x) where G(k)=4*k+1+x+(x^2)*(4*k+1)/((2*k+1)*(4*k+3)-(x^2)-x*(2*k+1)*(4*k+3)/( 2*k+2+x-x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 26 2011
a(n) = Re( (1+i)^n ) where i=sqrt(-1). - Stanislav Sykora, Jun 11 2012
G.f.: 1 / (1 - x / (1 + x / (1 - 2*x))) = 1 + x / (1 + 2*x^2 / (1 - 2*x)). - Michael Somos, Jan 03 2013
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(k+1)/(x*(k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
a(m+k) = a(m)*a(k) - A009545(m)*A009545(k). - Vladimir Shevelev, Jun 08 2017
a(n) = 2^(n/2)*cos(Pi*n/4). - Peter Luschny, Oct 09 2021
a(n) = 2^(n/2)*ChebyshevT(n, 1/sqrt(2)). - G. C. Greubel, Apr 17 2023
From Chai Wah Wu, Feb 15 2024: (Start)
a(n) = Sum_{n=0..floor(n/2)} binomial(n,2j)*(-1)^j = A121625(n)/n^n.
a(n) = 0 if and only if n == 2 mod 4.
(End)

A091867 Triangle read by rows: T(n,k) = number of Dyck paths of semilength n having k peaks at odd height.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 3, 4, 6, 0, 1, 6, 15, 10, 10, 0, 1, 15, 36, 45, 20, 15, 0, 1, 36, 105, 126, 105, 35, 21, 0, 1, 91, 288, 420, 336, 210, 56, 28, 0, 1, 232, 819, 1296, 1260, 756, 378, 84, 36, 0, 1, 603, 2320, 4095, 4320, 3150, 1512, 630, 120, 45, 0, 1, 1585, 6633, 12760, 15015, 11880, 6930, 2772, 990, 165, 55, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Mar 10 2004

Keywords

Comments

Number of ordered trees with n edges having k leaves at odd height. Row sums are the Catalan numbers (A000108). T(n,0)=A005043(n). Sum_{k=0..n} k*T(n,k) = binomial(2n-2,n-1).
T(n,k)=number of Dyck paths of semilength n and having k ascents of length 1 (an ascent is a maximal string of consecutive up steps). Example: T(4,2)=6 because we have UdUduud, UduuddUd, uuddUdUd, uudUdUdd, UduudUdd and uudUddUd (the ascents of length 1 are indicated by U instead of u).
T(n,k) is the number of Łukasiewicz paths of length n having k level steps (i.e., (1,0)). A Łukasiewicz path of length n is a path in the first quadrant from (0,0) to (n,0) using rise steps (1,k) for any positive integer k, level steps (1,0) and fall steps (1,-1) (see R. P. Stanley, Enumerative Combinatorics, Vol. 2, Cambridge Univ. Press, Cambridge, 1999, p. 223, Exercise 6.19w; the integers are the slopes of the steps). Example: T(4,1)=4 because we have HU(2)DD, U(2)HDD, U(2)DHD and U(2)DDH, where H=(1,0), U(1,1), U(2)=(1,2) and D=(1,-1). - Emeric Deutsch, Jan 06 2005
T(n,k) = number of noncrossing partitions of [n] containing k singleton blocks. Also, T(n,k) = number of noncrossing partitions of [n] containing k adjacencies. An adjacency is an occurrence of 2 consecutive integers in the same block (here 1 and n are considered consecutive). In fact, the statistics # singletons and # adjacencies have a symmetric joint distribution.
Exponential Riordan array [e^x*(Bessel_I(0,2x)-Bessel_I(1,2x)),x]. - Paul Barry, Mar 03 2011
T(n,k) is the number of ordered trees having n edges and exactly k nodes with one child. - Geoffrey Critzer, Feb 25 2013
From Tom Copeland, Nov 04 2014: (Start)
Summing the coeff. of the partitions in A134264 for a Lagrange inversion formula (see also A249548) containing (h_1)^k = (1')^k gives this triangle, so this array's o.g.f. H(x,t) = x + t * x^2 + (1 + t^2) * x^3 ... is the inverse of the o.g.f. of A104597 with a sign change, i.e., H^(-1)(x,t) = (x-x^2) / [1 + (t-1)(x-x^2)] = Cinv(x)/[1 + (t-1)Cinv(x)] = P[Cinv(x),t-1] where Cinv(x)= x * (1-x) is the inverse of C(x) = [1-sqrt(1-4*x)]/2, an o.g.f. for the Catalan numbers A000108, and P(x,t) = x/(1+t*x) with inverse Pinv(x,t) = -P(-x,t) = x/(1-t*x). Therefore,
O.g.f.: H(x,t) = C[Pinv(x,t-1)] = C[P(x,1-t)] = C[x/(1-(t-1)x)] = {1-sqrt[1-4*x/(1-(t-1)x)]}/2 (for A091867). Reprising,
Inverse O.g.f.: H^(-1)(x,t) = x*(1-x) / [1 + (t-1)x(1-x)] = P[Cinv(x),t-1].
From general arguments in A134264, the row polynomials are an Appell sequence with lowering operator d/dt, having the umbral property (p(.,t)+a)^n=p(n,t+a) with e.g.f. = e^(x*t)/w(x), where 1/w(x)= e.g.f. of first column for the Motzkin numbers in A005043. (Mislabeled argument corrected on Jan 31 2016.)
Cf. A124644 (t-shifted polynomials), A026378 (t=-4), A001700 (t=-3), A005773 (t=-2), A126930 (t=-1) and A210736 (t=-1, a(0)=0, unsigned), A005043 (t=0), A000108 (t=1), A007317 (t=2), A064613 (t=3), A104455 (t=4), A030528 (for inverses).
(End)
The sequence of binomial transforms A126930, A005043, A000108, ... in the above comment appears in A126930 and the link therein to a paper by F. Fite et al. on page 42. - Tom Copeland, Jul 23 2016

Examples

			T(4,2)=6 because we have (ud)uu(ud)dd, uu(ud)dd(ud), uu(ud)(ud)dd, (ud)(ud)uudd, (ud)uudd(ud) and uudd(ud)(ud) (here u=(1,1), d=(1,-1) and the peaks at odd height are shown between parentheses).
Triangle begins:
   1;
   0,   1;
   1,   0,   1;
   1,   3,   0,   1;
   3,   4,   6,   0,  1;
   6,  15,  10,  10,  0,  1;
  15,  36,  45,  20, 15,  0, 1;
  36, 105, 126, 105, 35, 21, 0, 1;
  ...
		

References

  • R. Sedgewick and P. Flajolet, Analysis of Algorithms, Addison and Wesley, 1996, page 254 (first edition)

Crossrefs

Programs

  • Maple
    T := proc(n,k) if k>n then 0 elif k=n then 1 else (binomial(n+1,k)/(n+1))*sum(binomial(n+1-k,j)*binomial(n-k-j-1,j-1),j=1..floor((n-k)/2)) fi end: seq(seq(T(n,k),k=0..n),n=0..12);
    T := (n,k) -> (-1)^(n+k)*binomial(n,k)*hypergeom([-n+k,1/2],[2],4): seq(seq(simplify(T(n, k)), k=0..n), n=0..10); # Peter Luschny, Jul 27 2016
    # alternative Maple program:
    b:= proc(x, y, t) option remember; expand(`if`(x=0, 1,
          `if`(y>0, b(x-1, y-1, 0)*z^irem(t*y, 2), 0)+
          `if`(y (p-> seq(coeff(p, z, i), i=0..n))(b(2*n, 0$2)):
    seq(T(n), n=0..16);  # Alois P. Heinz, May 12 2017
  • Mathematica
    nn=10;cy = ( 1 + x - x y - ( -4x(1+x-x y) + (-1 -x + x y)^2)^(1/2))/(2(1+x-x y)); Drop[CoefficientList[Series[cy,{x,0,nn}],{x,y}],1]//Grid  (* Geoffrey Critzer, Feb 25 2013 *)
    Table[Which[k == n, 1, k > n, 0, True, (Binomial[n + 1, k]/(n + 1)) Sum[Binomial[n + 1 - k, j] Binomial[n - k - j - 1, j - 1], {j, Floor[(n - k)/2]}]], {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 25 2016 *)

Formula

T(n, k) = [binomial(n+1, k)/(n+1)]*Sum_{j=1..floor((n-k)/2)} binomial(n+1-k, j)*binomial(n-k-j-1, j-1) for kn. G.f.=G=G(t, z) satisfies z(1+z-tz)G^2-(1+z-tz)G+1=0. T(n, k)=r(n-k)*binomial(n, k), where r(n)=A005043(n) are the Riordan numbers.
G.f.: 1/(1-xy-x^2/(1-x-xy-x^2/(1-x-xy-x^2/(1-x-xy-x^2/(1-... (continued fraction). - Paul Barry, Aug 03 2009
Sum_{k=0..n} T(n,k)*x^k = A126930(n), A005043(n), A000108(n), A007317(n), A064613(n), A104455(n) for x = -1,0,1,2,3,4 respectively. - Philippe Deléham, Dec 03 2009
Sum_{k=0..n} (-1)^(n-k)*T(n,k)*x^k = A168491(n), A099323(n+1), A001405(n), A005773(n+1), A001700(n), A026378(n+1), A005573(n), A122898(n) for x = -1, 0, 1, 2, 3, 4, 5, 6 respectively. - Philippe Deléham, Dec 03 2009
E.g.f.: e^(x+xy)*(Bessel_I(0,2x)-Bessel_I(1,2x)). - Paul Barry, Mar 10 2010
From Tom Copeland, Nov 06 2014: (Start)
O.g.f.: H(x,t) = {1-sqrt[1-4x/(1-(t-1)x)]}/2 (shifted index, as given in Copeland's comment, see comp. inverse there).
H(x,t)= x / [1-(C.+(t-1))x] = Sum_{n>=1} (C.+ (t-1))^(n-1)*x^n umbrally, e.g., (a.+b.)^2 = a_0*b_2 + 2 a_1*b1_+ a_0*b_2, where (C.)^n = C_n are the Catalan numbers (1,1,2,5,14,..) of A000108.
This shows directly that the lowering operator for the polynomials is D=d/dt, i.e., D p(n,t)= D(C. + (t-1))^n = n * (C. + (t-1))^(n-1) = n*p(n-1,t), so that the polynomials form an Appell sequence, and that p(n,0) gives a Motzkin sum, or Riordan, number A005043.
(End)
T(n,k) = (-1)^(n+k)*binomial(n,k)*hypergeom([k-n,1/2],[2],4). - Peter Luschny, Jul 27 2016

A130020 Triangle T(n,k), 0<=k<=n, read by rows given by [1,0,0,0,0,0,0,...] DELTA [0,1,1,1,1,1,1,...] where DELTA is the operator defined in A084938 .

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 5, 5, 0, 1, 4, 9, 14, 14, 0, 1, 5, 14, 28, 42, 42, 0, 1, 6, 20, 48, 90, 132, 132, 0, 1, 7, 27, 75, 165, 297, 429, 429, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 1430, 0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 4862, 0
Offset: 0

Views

Author

Philippe Deléham, Jun 16 2007

Keywords

Comments

Reflected version of A106566.

Examples

			Triangle begins:
  1;
  1, 0;
  1, 1,  0;
  1, 2,  2,   0;
  1, 3,  5,   5,   0;
  1, 4,  9,  14,  14,    0;
  1, 5, 14,  28,  42,   42,    0;
  1, 6, 20,  48,  90,  132,  132,    0;
  1, 7, 27,  75, 165,  297,  429,  429,    0;
  1, 8, 35, 110, 275,  572, 1001, 1430, 1430,    0;
  1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 4862,  0;
  ...
		

Crossrefs

The following are all versions of (essentially) the same Catalan triangle: A009766, A030237, A033184, A047072, A059365, A099039, A106566, this sequence.
Cf. A000108 (Catalan numbers), A106566 (row reversal), A210736.

Programs

  • Magma
    A130020:= func< n,k | n eq 0 select 1 else (n-k)*Binomial(n+k-1, k)/n >;
    [A130020(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 14 2022
    
  • Mathematica
    T[n_, k_]:= (n-k)Binomial[n+k-1, k]/n; T[0, 0] = 1;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Jean-François Alcover, Jun 14 2019 *)
  • PARI
    {T(n, k) = if( k<0 || k>=n, n==0 && k==0, binomial(n+k, n) * (n-k)/(n+k))}; /* Michael Somos, Oct 01 2022 */
  • Sage
    @CachedFunction
    def A130020(n, k):
        if n==k: return add((-1)^j*binomial(n, j) for j in (0..n))
        return add(A130020(n-1, j) for j in (0..k))
    for n in (0..10) :
        [A130020(n, k) for k in (0..n)]  # Peter Luschny, Nov 14 2012
    

Formula

T(n, k) = A106566(n, n-k).
Sum_{k=0..n} T(n,k) = A000108(n).
T(n, k) = (n-k)*binomial(n+k-1, k)/n with T(0, 0) = 1. - Jean-François Alcover, Jun 14 2019
Sum_{k=0..floor(n/2)} T(n-k, k) = A210736(n). - G. C. Greubel, Jun 14 2022
G.f.: Sum_{n>=0, k>=0} T(n, k)*x^k*z^n = 1/(1 - z*c(x*z)) where c(z) = g.f. of A000108.

A126930 Inverse binomial transform of A005043.

Original entry on oeis.org

1, -1, 2, -3, 6, -10, 20, -35, 70, -126, 252, -462, 924, -1716, 3432, -6435, 12870, -24310, 48620, -92378, 184756, -352716, 705432, -1352078, 2704156, -5200300, 10400600, -20058300, 40116600, -77558760, 155117520, -300540195, 601080390, -1166803110
Offset: 0

Views

Author

Philippe Deléham, Mar 17 2007

Keywords

Comments

Successive binomial transforms are A005043, A000108, A007317, A064613, A104455. Hankel transform is A000012.
Moment sequence of the trace of the square of a random matrix in USp(2)=SU(2). If X=tr(A^2) is a random variable (a distributed with Haar measure) then a(n) = E[X^n]. - Andrew V. Sutherland, Feb 29 2008
From Tom Copeland, Nov 08 2014: (Start)
This array is one of a family of Catalan arrays related by compositions of the special fractional linear (Mobius) transformation P(x,t) = x/(1-t*x); its inverse Pinv(x,t) = P(x,-t); an o.g.f. of the Catalan numbers A000108, C(x) = [1-sqrt(1-4x)]/2; and its inverse Cinv(x) = x*(1-x). The Motzkin sums, or Riordan numbers, A005043 are generated by Mot(x)=C[P(x,1)]. One could, of course, choose the Riordan numbers as the parent sequence.
O.g.f.: G(x) = C[P[P(x,1),1]1] = C[P(x,2)] = (1-sqrt(1-4*x/(1+2*x)))/2 = x - x^2 + 2 x^3 - ... = Mot[P(x,1)].
Ginv(x) = Pinv[Cinv(x),2] = P[Cinv(x),-2] = x(1-x)/[1-2x(1-x)] = (x-x^2)/[1-2(x-x^2)] = x*A146559(x).
Cf. A091867 and A210736 for an unsigned version with a leading 1. (End)

Crossrefs

Programs

  • Maple
    egf := BesselI(0,2*x) - BesselI(1,2*x):
    seq(n!*coeff(series(egf,x,34),x,n),n=0..33); # Peter Luschny, Dec 17 2014
  • Mathematica
    CoefficientList[Series[(1 + 2 x - Sqrt[1 - 4 x^2])/(2 x (1 + 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 23 2013 *)
    Table[2^n Hypergeometric2F1[3/2, -n, 2, 2], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 02 2015 *)
  • PARI
    x='x+O('x^50); Vec((1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x))) \\ Altug Alkan, Nov 03 2015

Formula

a(n) = (-1)^n*C(n, floor(n/2)) = (-1)^n*A001405(n).
a(2*n) = A000984(n), a(2*n+1) = -A001700(n).
a(n) = (1/Pi)*Integral_{t=0..Pi}(2cos(2t))^n*2sin^2(t) dt. - Andrew V. Sutherland, Feb 29 2008, Mar 09 2008
a(n) = (-2)^n + Sum_{k=0..n-1} a(k)*a(n-1-k), a(0)=1. - Philippe Deléham, Dec 12 2009
G.f.: (1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x)). - Philippe Deléham, Mar 01 2013
O.g.f.: (1 + x*c(x^2))/(1 + 2*x), with the o.g.f. c(x) for the Catalan numbers A000108. From the o.g.f. of the Riordan type Catalan triangle A053121. This is the rewritten g.f. given in the previous formula. This is G(-x) with the o.g.f. G(x) of A001405. - Wolfdieter Lang, Sep 22 2013
D-finite with recurrence (n+1)*a(n) +2*a(n-1) +4*(-n+1)*a(n-2)=0. - R. J. Mathar, Dec 04 2013
Recurrence (an alternative): (n+1)*a(n) = 8*(n-2)*a(n-3) + 4*(n-2)*a(n-2) + 2*(-n-1)*a(n-1), n>=3. - Fung Lam, Mar 22 2014
Asymptotics: a(n) ~ (-1)^n*2^(n+1/2)/sqrt(n*Pi). - Fung Lam, Mar 22 2014
E.g.f.: BesselI(0,2*x) - BesselI(1,2*x). - Peter Luschny, Dec 17 2014
a(n) = 2^n*hypergeom([3/2,-n], [2], 2). - Vladimir Reshetnikov, Nov 02 2015
G.f. A(x) satisfies: A(x) = 1/(1 + 2*x) + x*A(x)^2. - Ilya Gutkovskiy, Jul 10 2020

A380237 Number of sensed planar maps with n vertices and 2 faces.

Original entry on oeis.org

1, 2, 5, 14, 42, 140, 473, 1670, 5969, 21679, 79419, 293496, 1091006, 4078213, 15312150, 57721030, 218333832, 828408842, 3151769615, 12020870753, 45949957412, 176001205559, 675384194565, 2596119292840, 9994894356158, 38535398284100, 148772774499015, 575079507042663
Offset: 1

Views

Author

Andrew Howroyd, Jan 19 2025

Keywords

Comments

Also, by duality the number of sensed planar maps with n faces and 2 vertices.
The number of edges is n.

Crossrefs

Column 2 of A379430.
Cf. A000346 (rooted), A380238 (achiral), A380239 (unsensed), A060404 (with a distinguished face), A103943 (with a distinguished vertex).

Programs

  • PARI
    a(n) = {(binomial(n - 1, (n - 1)\2) + sumdiv(n, d, eulerphi(n/d)*(2^(2*d-1) - binomial(2*d-1, d)))/n)/2}
    
  • PARI
    seq(n)={my(c(d)=(1-sqrt(1-4*x^d + O(x*x^(n+d))))/(2*x^d)); Vec(1/(1 - x*c(2)) - 1 - sum(k=1, n, log(2 - c(k))*eulerphi(k)/k))/2}

Formula

a(n) = (A210736(n) + A060404(n))/2.
a(n) = (1/(2*n))*(n*binomial(n-1, floor((n-1)/2)) + Sum_{d|n} phi(n/d)*(2^(2*d-1) - binomial(2*d-1, d))).
G.f.: (1/2)*(1/(1 - x*C(x^2)) - 1 - Sum_{k>=1} log(1 - C(x^k)) * phi(k)/k), where C(x) is the g.f. of A000108.

A379431 Array read by antidiagonals: A(n,k) is the number of achiral planar maps with n vertices and k faces, n >= 1, k >= 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 5, 5, 2, 3, 12, 17, 12, 3, 6, 28, 58, 58, 28, 6, 10, 68, 179, 247, 179, 68, 10, 20, 157, 538, 942, 942, 538, 157, 20, 35, 372, 1531, 3388, 4345, 3388, 1531, 372, 35, 70, 845, 4288, 11424, 18316, 18316, 11424, 4288, 845, 70
Offset: 1

Views

Author

Andrew Howroyd, Jan 14 2025

Keywords

Comments

The planar maps considered are connected and may contain loops and parallel edges.
The number of edges is n + k - 2.

Examples

			==================================================
n\k |  1   2    3     4     5     6     7    8 ...
----+---------------------------------------------
  1 |  1   1    1     2     3     6    10   20 ...
  2 |  1   2    5    12    28    68   157  372 ...
  3 |  1   5   17    58   179   538  1531 4288 ...
  4 |  2  12   58   247   942  3388 11424 ...
  5 |  3  28  179   942  4345 18316 ...
  6 |  6  68  538  3388 18316 ...
  7 | 10 157 1531 11424 ...
  8 | 20 372 4288 ...
  ...
As a triangle, rows give the number of edges (first row is 0 edges):
   1;
   1,   1;
   1,   2,    1;
   2,   5,    5,   2;
   3,  12,   17,   12,    3;
   6,  28,   58,   58,   28,    6;
  10,  68,  179,  247,  179,   68,   10;
  20, 157,  538,  942,  942,  538,  157,  20;
  35, 372, 1531, 3388, 4345, 3388, 1531, 372, 35;
  ...
		

Crossrefs

Antidiagonal sums are A006443.
Column 1 is A210736(n-1).
Cf. A269920 (rooted), A277741 (unsensed), A379430 (sensed).

Formula

A(n,k) = A(k,n).

A383527 Partial sums of A005773.

Original entry on oeis.org

1, 2, 4, 9, 22, 57, 153, 420, 1170, 3293, 9339, 26642, 76363, 219728, 634312, 1836229, 5328346, 15494125, 45137995, 131712826, 384900937, 1126265986, 3299509114, 9676690939, 28407473191, 83470059532, 245465090758, 722406781935, 2127562036990, 6270020029353
Offset: 0

Views

Author

Mélika Tebni, Apr 29 2025

Keywords

Comments

For p prime of the form 4*k+3 (A002145), a(p) == 0 (mod p).
For p Pythagorean prime (A002144), a(p) - 2 == 0 (mod p).
a(n) (mod 2) = A010059(n).
a(A000069(n+1)) is even.
a(A001969(n+1)) is odd.

Crossrefs

Programs

  • Maple
    gf := (1 + sqrt((1 + x) / (1 - 3*x))) / (2*(1 - x)):
    a := n-> coeff(series(gf, x, n+1), x, n):
    seq(a(n), n = 0 .. 29);
    # Recurrence:
    a:= proc(n) option remember; `if`(n<=2, 2^n, 3*a(n-1) - (6/n-1)*a(n-2) + (6/n-3)*a(n-3)) end:
    seq(a(n), n = 0 .. 29);
  • Mathematica
    Module[{a, n}, RecurrenceTable[{a[n] == 3*a[n-1] - (6-n)*a[n-2]/n + 3*(2-n)*a[n-3]/n, a[0] == 1, a[1] == 2, a[2] == 4}, a, {n, 0, 30}]] (* Paolo Xausa, May 05 2025 *)
  • Python
    from math import comb as C
    def a(n):
      return sum(C(n, k)*abs(sum((-1)**j*C(k, j) for j in range(k//2 + 1))) for k in range(n + 1))
    print([a(n) for n in range(30)])

Formula

First differences of A211278.
a(n) = Sum_{k=0..n} A167630(n, k).
Binomial transform of A210736 (see Python program).
G.f.: (1 + sqrt((1 + x) / (1 - 3*x))) / (2*(1 - x)).
E.g.f.: (Integral_{x=-oo..oo} BesselI(0,2*x) dx + (1 + BesselI(0,2*x)) / 2)*exp(x).
Recurrence: n*a(n) = 3*n*a(n-1) - (6-n)*a(n-2) + 3*(2-n)*a(n-3). If n <= 2, a(n) = 2^n.
a(n) ~ 3^(n + 1/2) / (2*sqrt(Pi*n)). - Vaclav Kotesovec, May 02 2025
From Mélika Tebni, May 09 2025: (Start)
a(n) = A257520(n) + A097893(n-1) for n > 0.
a(n) = Sum_{j=0..n}(Sum_{k=0..j} A122896(j, k)).
a(n+2) - 3*a(n+1) + 2*a(n) = A005774(n).
a(n+2) - 4*a(n+1) + 4*a(n) - a(n-1) = A005775(n) for n >= 3. (End)

A210628 Expansion of (-1 + 2*x + sqrt( 1 - 4*x^2)) / (2*x) in powers of x.

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, -6564120420, 0, -24466267020, 0
Offset: 0

Views

Author

Michael Somos, Mar 25 2012

Keywords

Comments

Except for the leading term, the sequence is equal to -A097331(n). - Fung Lam, Mar 22 2014

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:=50; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!((-1 + 2*x + Sqrt(1-4*x^2))/(2*x))); // G. C. Greubel, Aug 11 2018
  • Mathematica
    CoefficientList[Series[1 - 2 x/(1 + Sqrt[1 - 4 x^2]), {x, 0, 45}], x] (* Bruno Berselli, Mar 25 2012 *)
    a[ n_] := SeriesCoefficient[ (-1 + 2 x + Sqrt[1 - 4 x^2]) / (2 x), {x, 0, n}];
  • Maxima
    makelist(coeff(taylor(1-2*x/(1+sqrt(1-4*x^2)), x, 0, n), x, n), n, 0, 45); /* Bruno Berselli, Mar 25 2012 */
    
  • PARI
    {a(n) = polcoeff( (-1 + 2*x + sqrt( 1 - 4*x^2 + x^2 * O(x^n))) / (2*x), n)};
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( serreverse( -x / (1 + x^2) + x * O(x^n)), n))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = 1 + O(x); for( k=1, n, A = 1 - x - x * (1 - A)^2); polcoeff( A, n))};
    

Formula

G.f.: 1 - (2*x) / (1 + sqrt( 1 - 4*x^2)) = 1 - (1 - sqrt( 1 - 4*x^2)) / (2*x).
G.f. A(x) satisfies 0 = f(x, A(x)) where f(x, y) = x*y^2 - (1 - 2*x) * (1 - y).
G.f. A(x) satisfies A( x / (1 + x^2) ) = 1 - x.
G.f. A(x) = 1 - x - x * (1 - A(x))^2 = 1 - 1/x + 1 / (1 - A(x)).
G.f. A(x) = 1 / (1 + x / (1 - 2*x + x * A(x))).
G.f. A(x) = 1 / (1 + x / (1 - x / (1 - x / (1 + x * A(x))))).
G.f. A(x) = 1 / (1 + x * A001405(x)). A126930(x) = 1 / (1 + x * A(x)).
G.f. A(x) = 1 - x / (1 - x^2 / (1 - x^2 / (1 - x^2 / ...))). - Michael Somos, Jan 02 2013
a(2*n) = 0 unless n=0, a(2*n + 1) = -A000108(n). a(n) = (-1)^n * A097331(n). a(n-1) = (-1)^floor(n/2) * A090192(n).
Convolution inverse of A210736. - Michael Somos, Jan 02 2013
G.f.: 2/( G(0) + 1), where G(k)= 1 + 4*x*(4*k+1)/( (4*k+2)*(1+2*x) - 2*x*(1+2*x)*(2*k+1)*(4*k+3)/(x*(4*k+3) + (1+2*x)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 24 2013
D-finite with recurrence: (n+3)*a(n+2) = 4*n*a(n), a(0)=1, a(1)=-1. - Fung Lam, Mar 17 2014
For nonzero odd-power terms, a(n) = -2^(n+1)/(n+1)^(3/2)/sqrt(2*Pi)*(1+3/(4*n) + O(1/n^2)). (with contribution of Vaclav Kotesovec) - Fung Lam, Mar 17 2014

A246555 a(n) = A036765(n-1) if n>0, with a(0) = 1.

Original entry on oeis.org

1, 1, 1, 2, 5, 13, 36, 104, 309, 939, 2905, 9118, 28964, 92940, 300808, 980864, 3219205, 10626023, 35252867, 117485454, 393133485, 1320357501, 4449298136, 15038769672, 50973266380, 173214422068, 589998043276, 2014026871496, 6889055189032, 23608722350440
Offset: 0

Views

Author

Michael Somos, Nov 14 2014

Keywords

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 5*x^4 + 13*x^5 + 36*x^6 + 104*x^7 + 309*x^8 + ...
		

Crossrefs

Programs

  • PARI
    {a(n) = if( n<1, n==0, polcoeff( serreverse( x / (1 + x + x^2 + x^3 + x*O(x^n))), n))};

Formula

Given g.f. A(x), series reversion of x * A(x) = x * A210736(-x).
G.f.: A(x) satisfies A(x) = 1 + x * A * (1 + (A(x) - 1)^2).
D-finite with recurrence 2*n*(2*n+1)*a(n) +3*(7*n^2-23*n+10) *a(n-1) +12*(-8*n^2+31*n-29) *a(n-2) -16*(5*n-11)*(n-3)*a(n-3) -128*(n-3) *(n-4)*a(n-4)=0. - R. J. Mathar, Jul 21 2023
Showing 1-10 of 11 results. Next