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.

Previous Showing 31-40 of 50 results. Next

A000736 Boustrophedon transform of Catalan numbers 1, 1, 1, 2, 5, 14, ...

Original entry on oeis.org

1, 2, 4, 10, 32, 120, 513, 2455, 13040, 76440, 492231, 3465163, 26530503, 219754535, 1959181266, 18710532565, 190588702776, 2062664376064, 23636408157551, 285900639990875, 3640199365715769, 48665876423760247
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a000736 n = sum $ zipWith (*) (a109449_row n) (1 : a000108_list)
    -- Reinhard Zumkeller, Nov 05 2013
    
  • Maple
    egf := (sec(x/2)+tan(x/2))*(exp(x)*((x-1/2)*BesselI(0,x)-x*BesselI(1,x))+3/2);
    s := n -> 2^n*n!*coeff(series(egf,x,n+2),x,n); seq(s(n), n=0..22); # Peter Luschny, Oct 30 2014, after Sergei N. Gladkovskii
  • Mathematica
    CoefficientList[Series[1/2*(3 + E^(2*x)*((4*x-1)*BesselI[0, 2*x] - 4*x*BesselI[1, 2*x]))*(Sec[x] + Tan[x]), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Oct 30 2014, after Peter Luschny *)
    t[n_, 0] := If[n == 0, 1, CatalanNumber[n - 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 *)
  • Python
    from itertools import accumulate, count, islice
    def A000736_gen(): # generator of terms
        yield 1
        blist, c = (1,), 1
        for i in count(0):
            yield (blist := tuple(accumulate(reversed(blist),initial=c)))[-1]
            c = c*(4*i+2)//(i+2)
    A000736_list = list(islice(A000736_gen(),40)) # Chai Wah Wu, Jun 12 2022

Formula

E.g.f.: (sec(x) + tan(x))*(integral(exp(2*x)*(BesselI(0,2*x)-BesselI(1,2*x)),x)+1). - Sergei N. Gladkovskii, Oct 30 2014
a(n) ~ n! * (6/Pi+2*exp(Pi)*((2-1/Pi)*BesselI(0,Pi)-2*BesselI(1,Pi))) * 2^n / Pi^n. - Vaclav Kotesovec, Oct 30 2014

A000746 Boustrophedon transform of triangular numbers.

Original entry on oeis.org

1, 4, 13, 39, 120, 407, 1578, 7042, 35840, 205253, 1306454, 9148392, 69887664, 578392583, 5155022894, 49226836114, 501420422112, 5426640606697, 62184720675718, 752172431553308, 9576956842743904, 128034481788227195
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a000746 n = sum $ zipWith (*) (a109449_row n) $ tail a000217_list
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    Coefficients(R!(Laplace( (Sec(x)+Tan(x))*Exp(x)*(x^2+4*x+2)/2 ))); // G. C. Greubel, Jul 10 2025
    
  • Mathematica
    t[n_, 0] := (n + 1) (n + 2)/2; 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, count, islice
    def A000746_gen(): # generator of terms
        blist, c = tuple(), 1
        for i in count(2):
            yield (blist := tuple(accumulate(reversed(blist),initial=c)))[-1]
            c += i
    A000746_list = list(islice(A000746_gen(),40)) # Chai Wah Wu, Jun 12 2022
    
  • SageMath
    @CachedFunction
    def f(n, k):
        if (k==0): return binomial(n+2,2)
        else: return f(n, k-1) + f(n-1, n-k)
    def A000746(n): return f(n,n)
    [A000746(n) for n in range(31)] # G. C. Greubel, Jul 10 2025

Formula

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

A230952 Boustrophedon transform of Hamming weight (A000120).

Original entry on oeis.org

0, 1, 3, 8, 23, 72, 280, 1242, 6331, 36236, 230726, 1615584, 12342422, 102145644, 910393530, 8693609421, 88552405435, 958361506524, 10982014291650, 132835979792636, 1691320230842116, 22611285878526978, 316685416851528722, 4636988553066906265
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 03 2013

Keywords

Crossrefs

Programs

  • Haskell
    a230952 n = sum $ zipWith (*) (a109449_row n) $ map fromIntegral a000120_list
    (Python 3.10+)
    from itertools import accumulate, count, islice
    def A230952_gen(): # generator of terms
            blist = tuple()
            for i in count(0):
                yield (blist := tuple(accumulate(reversed(blist),initial=i.bit_count())))[-1]
    A230952_list = list(islice(A230952_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Mathematica
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
    a[n_] := Sum[T[n, k] DigitCount[k, 2, 1], {k, 0, n}];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jul 23 2019 *)

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A000120(k).

A230957 Boustrophedon transform of partition numbers A000009.

Original entry on oeis.org

1, 2, 4, 10, 29, 94, 364, 1621, 8255, 47277, 300962, 2107479, 16099922, 133243363, 1187555333, 11340314638, 115511502857, 1250127378307, 14325404633040, 173276880401035, 2206229765086251, 29495119298584886, 413097874985119467, 6048684327982905454
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 03 2013

Keywords

Crossrefs

Cf. A000751.

Programs

  • Haskell
    a230957 n = sum $ zipWith (*) (a109449_row n) a000009_list
  • Mathematica
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
    a[n_] := Sum[T[n, k] PartitionsQ[k], {k, 0, n}];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jul 23 2019 *)

Formula

a(n) = sum(A109449(n,k)*A000009(k): k=0..n).

A231200 Boustrophedon transform of even numbers.

Original entry on oeis.org

0, 2, 8, 24, 72, 240, 924, 4116, 20944, 119952, 763540, 5346748, 40845816, 338041704, 3012855356, 28770647220, 293055401888, 3171602665696, 36343889387172, 439607533130732, 5597256953340360, 74829813397495128, 1048039052970587788, 15345654816688856484
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 05 2013

Keywords

Crossrefs

Programs

  • Haskell
    a231200 n = sum $ zipWith (*) (a109449_row n) $ [0, 2 ..]
    
  • Mathematica
    T[n_, k_] := SeriesCoefficient[(1+Sin[x])/Cos[x], {x, 0, n-k}] n!/k!;
    a[n_] := 2 Sum[k T[n, k], {k, 0, n}];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jun 28 2019 *)
  • Python
    from itertools import accumulate, count, islice
    def A231200_gen(): # generator of terms
        blist = tuple()
        for i in count(0,2):
            yield (blist := tuple(accumulate(reversed(blist),initial=i)))[-1]
    A231200_list = list(islice(A231200_gen(),40)) # Chai Wah Wu, Jun 12 2022

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*k*2.
a(n) = 2*A231179(n).
E.g.f.: 2*x*exp(x)*(sec(x) + tan(x)). - Ilya Gutkovskiy, Sep 27 2017

A000660 Boustrophedon transform of 1,1,2,3,4,5,...

Original entry on oeis.org

1, 2, 5, 14, 41, 136, 523, 2330, 11857, 67912, 432291, 3027166, 23125673, 191389108, 1705788659, 16289080922, 165919213089, 1795666675824, 20576824369027, 248892651678198, 3168999664907705, 42366404751871660, 593368400878431795, 8688251294851280594
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a000660 n = sum $ zipWith (*) (a109449_row n) (1 : [1..])
    -- Reinhard Zumkeller, Nov 04 2013
    
  • Maple
    seq(coeff(series(factorial(n)*(x*exp(x)+1)*(sec(x)+tan(x)), x,n+1),x,n),n=0..25); # Muniru A Asiru, Jul 30 2018
  • Mathematica
    a[n_] := n! SeriesCoefficient[(1+x Exp[x])(1+Sin[x])/Cos[x], {x, 0, n}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 30 2018, after Sergei N. Gladkovskii *)
  • Python
    from itertools import accumulate, count, islice
    def A000660_gen(): # generator of terms
        yield 1
        blist = (1,)
        for i in count(1):
            yield (blist := tuple(accumulate(reversed(blist),initial=i)))[-1]
    A000660_list = list(islice(A000660_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000660_list(n) :
        R = []; A = {-1:0, 0:1}
        k = 0; e = 1
        for i in range(n) :
            Am = i
            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
    A000660_list(10) # Peter Luschny, Jun 02 2012
    

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A028310(k). - Reinhard Zumkeller, Nov 04 2013
E.g.f.: (x*exp(x) + 1)*(sec(x) + tan(x)). - Sergei N. Gladkovskii, Oct 28 2014
a(n) = A231179(n) + A000111(n). - Sergei N. Gladkovskii, Oct 28 2014
a(n) ~ n! * (2 + Pi*exp(Pi/2)) * (2/Pi)^(n+1). - Vaclav Kotesovec, Jun 12 2015

A000733 Boustrophedon transform of partition numbers 1, 1, 1, 2, 3, 5, 7, ...

Original entry on oeis.org

1, 2, 4, 10, 30, 101, 394, 1760, 8970, 51368, 326991, 2289669, 17491625, 144760655, 1290204758, 12320541392, 125496010615, 1358185050788, 15563654383395, 188254471337718, 2396930376564860, 32044598671291610
Offset: 0

Views

Author

Keywords

Examples

			The array begins:
                   1
               1  ->   2
           4  <-   3  <-   1
       2  ->   6  ->   9  ->  10
  30  <-  28  <-  22  <-  13  <-   3
- _John Cerkan_, Jan 26 2017
		

Crossrefs

Programs

  • Haskell
    a000733 n = sum $ zipWith (*) (a109449_row n) (1 : a000041_list)
    -- Reinhard Zumkeller, Nov 04 2013
    
  • Mathematica
    t[n_, 0] := If[n == 0, 1, PartitionsP[n-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 *)
  • Python
    from itertools import count, accumulate, islice
    from sympy import npartitions
    def A000733_gen(): # generator of terms
        yield 1
        blist = (1,)
        for i in count(0):
            yield (blist := tuple(accumulate(reversed(blist),initial=npartitions(i))))[-1]
    A000733_list = list(islice(A000733_gen(),40)) # Chai Wah Wu, Jun 12 2022

A230958 Boustrophedon transform of Thue-Morse sequence A001285.

Original entry on oeis.org

1, 3, 7, 15, 39, 127, 480, 2143, 10907, 62495, 397814, 2785861, 21282228, 176133285, 1569817724, 14990658724, 152693582275, 1652531857935, 18936620009722, 229053108410969, 2916394751599614, 38989325834726043, 546070266163669664, 7995699956778626764
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 04 2013

Keywords

Crossrefs

Programs

  • Haskell
    a230958 n = sum $ zipWith (*) (a109449_row n) $ map fromIntegral a001285_list
    
  • Mathematica
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
    tm[n_] := Mod[Sum[Mod[Binomial[n, k], 2], {k, 0, n}], 3];
    Table[Sum[T[n, k] tm[k], {k, 0, n}], {n, 0, 23}] (* Jean-François Alcover, Jul 23 2019 *)
  • Python
    from itertools import accumulate, count, islice
    def A230958_gen(): # generator of terms
        blist = tuple()
        for i in count(0):
            yield (blist := tuple(accumulate(reversed(blist), initial=2 if i.bit_count()&1 else 1)))[-1]
    A230958_list = list(islice(A230958_gen(),30)) # Chai Wah Wu, Apr 17 2023

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A001285(k).

A000674 Boustrophedon transform of 1, 2, 2, 2, 2, ...

Original entry on oeis.org

1, 3, 7, 16, 43, 138, 527, 2346, 11943, 68418, 435547, 3050026, 23300443, 192835698, 1718682167, 16412205306, 167173350543, 1809239622978, 20732358910387, 250773962554186, 3192953259262243, 42686640718266258, 597853508941160207
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 1 + 3*x + 7*x^2 + 16*x^3 + 43*x^4 + 138*x^5 + 527*x^6 + 2346*x^7 + ...
		

Crossrefs

Programs

  • Haskell
    a000674 n = sum $ zipWith (*) (a109449_row n) (1 : repeat 2)
    -- Reinhard Zumkeller, Nov 04 2013
    
  • Mathematica
    With[{nn=30},CoefficientList[Series[(Sec[x]+Tan[x])(2Exp[x]-1),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Oct 04 2015 *)
  • Python
    from itertools import accumulate, islice
    def A000674_gen(): # generator of terms
        yield 1
        blist = (1,)
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=2)))[-1]
    A000674_list = list(islice(A000674_gen(),30)) # Chai Wah Wu, Jun 11 2022

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A040000(k). - Reinhard Zumkeller, Nov 04 2013
E.g.f.: (sec(x) + tan(x))*(2*exp(x) - 1). - Sergei N. Gladkovskii, Oct 28 2014
Binomial convolution of A000111 and A040000. - Michael Somos, Oct 30 2014
a(n) ~ n! * (2*exp(Pi/2)-1) * 2^(n+2) / Pi^(n+1). - Vaclav Kotesovec, Jun 12 2015

Extensions

More terms from Sean A. Irvine, Feb 20 2011

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
Previous Showing 31-40 of 50 results. Next