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.

A162171 Third column of A162170.

Original entry on oeis.org

1, 3, 6, 20, 75, 336, 1708, 9792, 62325, 436480, 3334386, 27595776, 245951615, 2348666880, 23923317720, 258910994432, 2966901358185, 35886973648896, 456927138333790, 6108665873694720, 85555744482868275, 1252729007440396288, 19140289332506060676
Offset: 1

Views

Author

Mats Granvik, Jun 27 2009

Keywords

Crossrefs

Programs

  • PARI
    T(n, k) = if (k % 2, binomial(n-1, k-1) * (-1)^floor((n+k-1)/2), if (n==k, 1 , 0));
    lista(nn) = {m = matrix(nn, nn, n, k, if (n>=k, T(n,k), 0)); m = m^(-1); for (n=3, nn, print1(m[n,3], ", "));} \\ Michel Marcus, Jun 17 2015
    
  • PARI
    lista(nn) = { a = [1]; for(n = 2, nn, a = concat(a, sum(k = 1, j = floor(n/2), (-1)^(j+k) * binomial(n+1, 2*k) * a[2*k-1]))); print(a) } \\ Mike Tryczak, Jun 18 2015

Formula

a(n) = Sum_{k=1..floor(n/2)} (-1)^(floor(n/2)+k) * binomial(n+1, 2*k) * a(2*k-1) for n > 1. - Mike Tryczak, Jun 18 2015
a(n) = n*(n+1)/2 * A000111(n-1) (conjectured). - Mike Tryczak, Jun 17 2015
The above conjecture by Tryczak is correct. With an offset of 2, the e.g.f. is x^2/2!*(sec(x) + tan(x)). - Peter Bala, Sep 08 2021
a(n) is the number of ranked unlabeled binary tree shapes compatible with the binary perfect phylogeny (n,3). - Noah A Rosenberg, Jun 03 2022

Extensions

Sequence corrected and extended by Mike Tryczak, Jun 17 2015

A062272 Boustrophedon transform of (n+1) mod 2.

Original entry on oeis.org

1, 1, 2, 5, 12, 41, 152, 685, 3472, 19921, 126752, 887765, 6781632, 56126201, 500231552, 4776869245, 48656756992, 526589630881, 6034272215552, 72989204937125, 929327412759552, 12424192360405961, 174008703107274752
Offset: 0

Views

Author

Frank Ellermann, Jun 16 2001

Keywords

Crossrefs

A000734 (binomial transform), a(2n+1)= A003719(n), a(2n)= A000795(n),
Cf. A062161 (n mod 2).
Row sums of A162170 minus A000035. - Mats Granvik, Jun 27 2009
Cf. A059841.

Programs

  • Haskell
    a062272 n = sum $ zipWith (*) (a109449_row n) $ cycle [1,0]
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Mathematica
    s[n_] = Mod[n+1, 2]; t[n_, 0] := s[n]; t[n_, k_] := t[n, k] = t[n, k-1] + t[n-1, n-k]; a[n_] := t[n, n]; Array[a, 30, 0] (* Jean-François Alcover, Feb 12 2016 *)
  • Python
    from itertools import accumulate, islice
    def A062272_gen(): # generator of terms
        blist, m = tuple(), 0
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=(m := 1-m))))[-1]
    A062272_list = list(islice(A062272_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Generalized algorithm of L. Seidel (1877)
    def A062272_list(n) :
        R = []; A = {-1:0, 0:0}
        k = 0; e = 1
        for i in range(n) :
            Am = 1 if e == 1 else 0
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            R.append(A[e*i//2])
        return R
    A062272_list(10) # Peter Luschny, Jun 02 2012
    

Formula

E.g.f.: (sec(x)+tan(x))cosh(x); a(n)=(A000667(n)+A062162(n))/2. - Paul Barry, Jan 21 2005
a(n) = Sum{k, k>=0} binomial(n, 2k)*A000111(n-2k). - Philippe Deléham, Aug 28 2005
a(n) = sum(A109449(n,k) * (1 - n mod 2): k=0..n). - Reinhard Zumkeller, Nov 03 2013

A162169 Exponential series expansion of (cos(x) - sin(x))*cosh(t*x) + sinh(t*x).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, 1, 0, -3, 1, 1, 0, -6, 0, 1, -1, 0, 10, 0, -5, 1, -1, 0, 15, 0, -15, 0, 1, 1, 0, -21, 0, 35, 0, -7, 1, 1, 0, -28, 0, 70, 0, -28, 0, 1, -1, 0, 36, 0, -126, 0, 84, 0, -9, 1, -1, 0, 45, 0, -210, 0, 210, 0, -45, 0, 1, 1, 0, -55, 0, 330, 0, -462, 0, 165, 0, -11, 1
Offset: 1

Views

Author

Mats Granvik, Jun 27 2009

Keywords

Comments

Previous name was: Signed version of Pascal's triangle.
Related to A000111 via its matrix inverse A162170.
For odd columns k, T(n, k) = binomial(n-1, k-1) * (-1)^floor((n+k-1)/2). For even columns, T(n, k) = 1 if n = k, otherwise 0. - Mike Tryczak, Jun 17 2015
From Peter Bala, Sep 08 2021: (Start)
In the notation of the Bala link, this is the array [[ cos(x) - sin(x), 1 ]] with inverse array A162170 = [[ sec(x) + tan(x), 1 ]].
In general, arrays of the form [[ G(x), 1 ]], where G(x) = 1 + g(1)*x + g(2)*x^2/2! + g(3)*x^3/3! + ... is an e.g.f., form a group with group law [[ G(x), 1 ]]*[[ F(x), 1 ]] = [[ G(x)*F_e(x) + F_o(x), 1 ]] and inverse array [[ G(x), 1 ]]^(-1) = [[ (1 - G_o(x))/G_e(x), 1 ]], where G_e(x) = (G(x) + G(-x))/2 and G_o(x) = (G(x) - G(-x))/2 are the even and odd parts of G(x). (End)

Examples

			Table begins:
   1;
  -1,    1;
  -1,    0,    1;
   1,    0,   -3,    1;
   1,    0,   -6,    0,    1;
  -1,    0,   10,    0,   -5,    1;
  -1,    0,   15,    0,  -15,    0,    1;
   1,    0,  -21,    0,   35,    0,   -7,    1;
   1,    0,  -28,    0,   70,    0,  -28,    0,    1;
  -1,    0,   36,    0, -126,    0,   84,    0,   -9,    1;
  -1,    0,   45,    0, -210,    0,  210,    0,  -45,    0,    1;
   1,    0,  -55,    0,  330,    0, -462,    0,  165,    0,  -11,    1;
.
As a symmetric triangle:
                                   1;
                               -1,    1;
                            -1,    0,    1;
                          1,    0,   -3,    1;
                       1,    0,   -6,    0,    1;
                   -1,    0,   10,    0,   -5,    1;
                -1,    0,   15,    0,  -15,    0,    1;
              1,    0,  -21,    0,   35,    0,   -7,    1;
           1,    0,  -28,    0,   70,    0,  -28,    0,    1;
       -1,    0,   36,    0, -126,    0,   84,    0,   -9,    1;
    -1,    0,   45,    0, -210,    0,  210,    0,  -45,    0,    1;
  1,    0,  -55,    0,  330,    0, -462,    0,  165,    0,  -11,    1;
		

Crossrefs

Programs

  • Excel
    =if(or(mod(row()-column();4)=1;mod(row()-column();4)=2);-1;1)*if(row()>=column();combin(row()-1;column()-1);0)*if(and(row()>column();mod(column();2)=0);0;1)
    
  • Maple
    egf := (cos(x) - sin(x))*cosh(t*x) + sinh(t*x):
    ser := n -> series(egf, x, n+1): c := n -> n!*coeff(ser(n), x, n):
    A162169row := n -> seq(coeff(c(n), t, k), k=0..n):
    for n from 0 to 9 do A162169row(n) od; # Peter Luschny, Sep 18 2021
  • Mathematica
    nn=12; Flatten[Table[Table[If[Or[Mod[n - k, 4] == 1, Mod[n - k, 4] == 2], -1, 1]*If[n >= k, Binomial[n - 1, k - 1], 0]*If[And[n > k, Mod[k, 2] == 0], 0, 1], {k, 1, n}], {n, 1, nn}]] (* Mats Granvik, Nov 25 2017 *)
  • PARI
    T(n, k) = if (k % 2, binomial(n-1, k-1) * (-1)^floor((n+k-1)/2), if (n==k, 1 , 0));
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(T(n,k), ", ");); print(););} \\ Michel Marcus, Jun 17 2015

Formula

E.g.f.: (cos(x) - sin(x))*cosh(t*x) + sinh(t*x) = 1 + (-1 + t)*x + (-1 + t^2)*x^2/2! + (1 - 3^t^2 + t^3)*x^3/3! + .... - Peter Bala, Sep 08 2021

Extensions

New name using a formula of Peter Bala from Peter Luschny, Sep 18 2021

A173253 Partial sums of A000111.

Original entry on oeis.org

1, 2, 3, 5, 10, 26, 87, 359, 1744, 9680, 60201, 413993, 3116758, 25485014, 224845995, 2128603307, 21520115452, 231385458428, 2636265133869, 31725150246701, 402096338484226, 5353594391608322, 74702468784746223, 1090126355291598575, 16604660518848685480
Offset: 0

Views

Author

Jonathan Vos Post, Feb 14 2010

Keywords

Comments

Partial sums of Euler or up/down numbers. Partial sums of expansion of sec x + tan x. Partial sums of number of alternating permutations on n letters.

Examples

			a(22) = 1 + 1 + 1 + 2 + 5 + 16 + 61 + 272 + 1385 + 7936 + 50521 + 353792 + 2702765 + 22368256 + 199360981 + 1903757312 + 19391512145 + 209865342976 + 2404879675441 + 29088885112832 + 370371188237525 + 4951498053124096 + 69348874393137901.
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    a:= proc(n) option remember;
          `if`(n<0, 0, a(n-1))+ b(n, 0)
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Oct 27 2017
  • Mathematica
    With[{nn=30},Accumulate[CoefficientList[Series[Sec[x]+Tan[x],{x,0,nn}],x] Range[0,nn]!]] (* Harvey P. Dale, Feb 26 2012 *)
  • Python
    from itertools import accumulate
    def A173253(n):
        if n<=1:
            return n+1
        c, blist = 2, (0,1)
        for _ in range(n-1):
            c += (blist := tuple(accumulate(reversed(blist),initial=0)))[-1]
        return c # Chai Wah Wu, Apr 16 2023

Formula

a(n) = SUM[i=0..n] A000111(i) = SUM[i=0..n] (2^i|E(i,1/2)+E(i,1)| where E(n,x) are the Euler polynomials).
G.f.: (1 + x/Q(0))/(1-x),m=+4,u=x/2, where Q(k) = 1 - 2*u*(2*k+1) - m*u^2*(k+1)*(2*k+1)/( 1 - 2*u*(2*k+2) - m*u^2*(k+1)*(2*k+3)/Q(k+1) ) ; (continued fraction). - Sergei N. Gladkovskii, Sep 24 2013
G.f.: 1/(1-x) + T(0)*x/(1-x)^2, where T(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 2*(1-x*(k+1))*(1-x*(k+2))/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 20 2013
a(n) ~ 2^(n+2)*n!/Pi^(n+1). - Vaclav Kotesovec, Oct 27 2016
Showing 1-4 of 4 results.