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

A000667 Boustrophedon transform of all-1's sequence.

Original entry on oeis.org

1, 2, 4, 9, 24, 77, 294, 1309, 6664, 38177, 243034, 1701909, 13001604, 107601977, 959021574, 9157981309, 93282431344, 1009552482977, 11568619292914, 139931423833509, 1781662223749884, 23819069385695177, 333601191667149054, 4884673638115922509
Offset: 0

Views

Author

Keywords

Comments

Fill in a triangle, like Pascal's triangle, beginning each row with a 1 and filling in rows alternately right to left and left to right.
Row sums of triangle A109449. - Reinhard Zumkeller, Nov 04 2013

Examples

			...............1..............
............1..->..2..........
.........4..<-.3...<-..1......
......1..->.5..->..8...->..9..
		

Crossrefs

Absolute value of pairwise sums of A009337.
Column k=1 of A292975.

Programs

  • Haskell
    a000667 n = if x == 1 then last xs else x
                where xs@(x:_) = a227862_row n
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Mathematica
    With[{nn=30},CoefficientList[Series[Exp[x](Tan[x]+Sec[x]),{x,0,nn}], x]Range[0,nn]!] (* Harvey P. Dale, Nov 28 2011 *)
    t[, 0] = 1; 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 *)
  • PARI
    x='x+O('x^33); Vec(serlaplace( exp(x)*(tan(x) + 1/cos(x)) ) ) \\ Joerg Arndt, Jul 30 2016
    
  • Python
    from itertools import islice, accumulate
    def A000667_gen(): # generator of terms
        blist = tuple()
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=1)))[-1]
    A000667_list = list(islice(A000667_gen(),20)) # Chai Wah Wu, Jun 11 2022
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000667_list(n) :
        R = []; A = {-1:0, 0:0}
        k = 0; e = 1
        for i in range(n) :
            Am = 1
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            # print [A[z] for z in (-i//2..i//2)]
            R.append(A[e*i//2])
        return R
    A000667_list(10)  # Peter Luschny, Jun 02 2012
    

Formula

E.g.f.: exp(x) * (tan(x) + sec(x)).
Limit_{n->infinity} 2*n*a(n-1)/a(n) = Pi; lim_{n->infinity} a(n)*a(n-2)/a(n-1)^2 = 1 + 1/(n-1). - Gerald McGarvey, Aug 13 2004
a(n) = Sum_{k=0..n} binomial(n, k)*A000111(n-k). a(2*n) = A000795(n) + A009747(n), a(2*n+1) = A002084(n) + A003719(n). - Philippe Deléham, Aug 28 2005
a(n) = A227862(n, n * (n mod 2)). - Reinhard Zumkeller, Nov 01 2013
G.f.: E(0)*x/(1-x)/(1-2*x) + 1/(1-x), where E(k) = 1 - x^2*(k + 1)*(k + 2)/(x^2*(k + 1)*(k + 2) - 2*(x*(k + 2) - 1)*(x*(k + 3) - 1)/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 16 2014
a(n) ~ n! * exp(Pi/2) * 2^(n+2) / Pi^(n+1). - Vaclav Kotesovec, Jun 12 2015

A000752 Boustrophedon transform of powers of 2.

Original entry on oeis.org

1, 3, 9, 28, 93, 338, 1369, 6238, 31993, 183618, 1169229, 8187598, 62545893, 517622498, 4613366689, 44054301358, 448733127793, 4856429646978, 55650582121749, 673136951045518, 8570645832753693, 114581094529057058, 1604780986816602409, 23497612049668468078
Offset: 0

Views

Author

Keywords

Crossrefs

Column k=2 of A292975.

Programs

  • Haskell
    a000752 n = sum $ zipWith (*) (a109449_row n) a000079_list
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Mathematica
    t[n_, 0] := 2^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 *)
    With[{nn=30},CoefficientList[Series[Exp[2x](Tan[ x]+Sec[x]),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Dec 15 2018 *)
  • Python
    from itertools import accumulate, islice
    def A000752_gen(): # generator of terms
        blist, m = tuple(), 1
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=m)))[-1]
            m *= 2
    A000752_list = list(islice(A000752_gen(),40)) # Chai Wah Wu, Jun 12 2022

Formula

E.g.f.: exp(2*x) (tan(x) + sec(x)).
a(n) = Sum_{k=0..n} A109449(n,k)*2^k. - Reinhard Zumkeller, Nov 03 2013
G.f.: E(0)*x/(1 - 2*x)/(1 - 3*x) + 1/(1 - 2*x), where E(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 2*(x*(k+3) - 1)*(x*(k+4) -1)/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Jan 16 2014
a(n) ~ n! * exp(Pi) * 2^(n+2) / Pi^(n+1). - Vaclav Kotesovec, Jun 12 2015

A292976 a(n) = n! * [x^n] exp(n*x)*(sec(x) + tan(x)).

Original entry on oeis.org

1, 2, 9, 65, 645, 8141, 124729, 2247853, 46584937, 1091386465, 28521016621, 822514469149, 25946988879053, 888784357214729, 32851731018695905, 1303291334592451037, 55235983848811714129, 2490726416399046168993, 119065442891277782378581, 6014589653389306889686941
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 27 2017

Keywords

Crossrefs

Main diagonal of A292975.
Cf. A000111.

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, k) option remember; `if`(k=0, b(n, 0),
          add(binomial(n, j)*A(j, k-1), j=0..n))
        end:
    a:= n-> A(n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 27 2017
  • Mathematica
    Table[n! SeriesCoefficient[Exp[n x] (Sec[x] + Tan[x]), {x, 0, n}], {n, 0, 20}]

Formula

a(n) = A292975(n,n).
a(n) ~ (1 + sin(1)) / cos(1) * n^n. - Vaclav Kotesovec, Oct 06 2017

A307878 Expansion of e.g.f. exp(3*x)*(sec(x) + tan(x)).

Original entry on oeis.org

1, 4, 16, 65, 272, 1189, 5506, 27365, 147512, 868129, 5589646, 39309965, 300724652, 2489776969, 22192420786, 211923843365, 2158631018192, 23361793658209, 267706067651926, 3238110860029565, 41228900865842132, 551189774407729849, 7719762678323791066
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 04 2019

Keywords

Comments

Boustrophedon transform of A000244 (powers of 3).

Crossrefs

Column k=3 of A292975.

Programs

  • Mathematica
    nmax = 22; CoefficientList[Series[Exp[3 x] (Sec[x] + Tan[x]), {x, 0, nmax}], x] Range[0, nmax]!
    t[n_, 0] := 3^n; t[n_, k_] := t[n, k] = t[n, k - 1] + t[n - 1, n - k]; a[n_] := t[n, n]; Array[a, 23, 0]
  • Python
    from itertools import accumulate, islice
    def A307878_gen(): # generator of terms
        blist, m = tuple(), 1
        yield from blist
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=m)))[-1]
            m *= 3
    A307878_list = list(islice(A307878_gen(),40)) # Chai Wah Wu, Jun 12 2022

A307879 Expansion of e.g.f. exp(4*x)*(sec(x) + tan(x)).

Original entry on oeis.org

1, 5, 25, 126, 645, 3380, 18285, 103036, 610345, 3833540, 25714345, 185107596, 1433220045, 11932724900, 106613406405, 1019012112556, 10382757537745, 112378069315460, 1287787864054465, 15576862520435916, 198330820236011445, 2651486893149253220, 37135749401704458525
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 04 2019

Keywords

Comments

Boustrophedon transform of A000302 (powers of 4).

Crossrefs

Column k=4 of A292975.

Programs

  • Mathematica
    nmax = 22; CoefficientList[Series[Exp[4 x] (Sec[x] + Tan[x]), {x, 0, nmax}], x] Range[0, nmax]!
    t[n_, 0] := 4^n; t[n_, k_] := t[n, k] = t[n, k - 1] + t[n - 1, n - k]; a[n_] := t[n, n]; Array[a, 23, 0]
  • Python
    from itertools import accumulate, islice
    def A307879_gen(): # generator of terms
        blist, m = tuple(), 1
        yield from blist
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=m)))[-1]
            m *= 4
    A307879_list = list(islice(A307879_gen(),40)) # Chai Wah Wu, Jun 12 2022
Showing 1-5 of 5 results.