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

A024255 a(0)=0, a(n) = n*E(2n-1) for n >= 1, where E(n) = A000111(n) are the Euler (or up-down) numbers.

Original entry on oeis.org

0, 1, 4, 48, 1088, 39680, 2122752, 156577792, 15230058496, 1888788086784, 290888851128320, 54466478584365056, 12185086638082228224, 3209979242472703787008, 983522422455215438430208, 346787762817143967622103040, 139423404114002708738732982272
Offset: 0

Views

Author

Keywords

Comments

Number of cyclically alternating permutations of length 2n. Example: a(2)=4 because we have 1324, 1423, 2314, and 2413 (3412 is alternating but not cyclically alternating).

Crossrefs

Programs

  • Maple
    a := n -> (-1)^n*2^(2*n-1)*(1-2^(2*n))*bernoulli(2*n); # Peter Luschny, Jun 08 2009
  • Mathematica
    nn = 30; t = Range[0, nn]! CoefficientList[Series[Tan[x]*x/2, {x, 0, nn}], x]; Take[t, {1, nn, 2}]
    Table[(-1)^n 2 n PolyLog[1 - 2 n, -I], {n, 0, 19}] (* Peter Luschny, Aug 17 2021 *)
  • Python
    from itertools import accumulate, islice, count
    def A024255_gen(): # generator of terms
        yield from (0,1)
        blist = (0,1)
        for n in count(2):
            yield n*(blist := tuple(accumulate(reversed(tuple(accumulate(reversed(blist),initial=0))),initial=0)))[-1]
    A024255_list = list(islice(A024255_gen(),40)) # Chai Wah Wu, Jun 09-11 2022

Formula

a(n) = 2^(n-1)*(2^n-1)*|B_n|.
E.g.f.: tan(x)*x/2 (even part).
a(n) = (2*n)!*Pi^(-2*n)*(4^n-1)*Li{2*n}(1) for n > 0. - Peter Luschny, Jun 29 2012
G.f.: Q(0)*x/(1-4*x), where Q(k) = 1 - 16*x^2*(k+2)*(k+1)^3/( 16*x^2*(k+2)*(k+1)^3 - (1 - 8*x*k^2 - 12*x*k -4*x)*(1 - 8*x*k^2 - 28*x*k -24*x)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 23 2013
a(n) = A009752(n)/2. - Alois P. Heinz, Aug 17 2021
a(n) = (-1)^n*2*n*PolyLog(1 - 2*n, -i). - Peter Luschny, Aug 17 2021

Extensions

Edited by Emeric Deutsch, Jul 01 2009

A009707 Expansion of e.g.f. tan(tan(x)*x) (even powers only).

Original entry on oeis.org

0, 2, 8, 336, 15616, 1450240, 185032704, 33566984192, 7971973332992, 2424984197529600, 915532582868746240, 420569934453637906432, 230845747512083447021568, 149228982402223336708898816
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 20; Table[(CoefficientList[Series[Tan[x*Tan[x]], {x, 0, 2*nmax}], x] * Range[0, 2 nmax]!)[[n]], {n, 1, 2*nmax + 1, 2}] (* Vaclav Kotesovec, Dec 21 2017 *)

Formula

a(n) ~ c * d^n * n^(2*n + 1/2) / exp(2*n), where d = 3.9786913954409425781217887822690623430980810... is the root of the equation tan(2/sqrt(d)) = Pi*sqrt(d)/4 and c = 1.4057183994645... - Vaclav Kotesovec, Dec 21 2017

Extensions

Extended and signs tested Mar 15 1997 by Olivier Gérard.

A099028 Euler-Seidel matrix T(k,n) with start sequence e.g.f. 2x/(1+e^(2x)), read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, -1, -2, -3, -3, -2, 0, 0, 3, 6, 8, 8, 25, 25, 22, 16, 8, 0, 0, -25, -50, -72, -88, -96, -96, -427, -427, -402, -352, -280, -192, -96, 0, 0, 427, 854, 1256, 1608, 1888, 2080, 2176, 2176, 12465, 12465, 12038, 11184, 9928, 8320, 6432, 4352, 2176, 0
Offset: 0

Views

Author

Ralf Stephan, Sep 27 2004

Keywords

Comments

In an Euler-Seidel matrix, the rows are consecutive pairwise sums and the columns consecutive differences.

Examples

			Seidel matrix:
[    0     1    -2     0     8     0   -96     0  2176     0]
[    1    -1    -2     8     8   -96   -96  2176  2176     .]
[    0    -3     6    16   -88  -192  2080  4352     .     .]
[   -3     3    22   -72  -280  1888  6432     .     .     .]
[    0    25   -50  -352  1608  8320     .     .     .     .]
[   25   -25  -402  1256  9928     .     .     .     .     .]
[    0  -427   854 11184     .     .     .     .     .     .]
[ -427   427 12038     .     .     .     .     .     .     .]
[    0 12465     .     .     .     .     .     .     .     .]
[12465     .     .     .     .     .     .     .     .     .]
		

Crossrefs

First column (odd part) is A009843, main diagonal is in A099029. Antidiagonal sums are in A065619. Cf. A009752.

Programs

  • Mathematica
    T[k_, n_] := T[k, n] = If[k == 0, SeriesCoefficient[2x/(1 + E^(2x)), {x, 0, n}] n!, T[k-1, n] + T[k-1, n+1]];
    Table[T[k-n, n], {k, 0, 9}, {n, 0, k}] (* Jean-François Alcover, Jun 11 2019 *)
  • Sage
    def SeidelMatrixA099028(dim):
        E = matrix(ZZ, dim)
        t = taylor(2*x/(1+exp(2*x)), x, 0, dim + 1)
        for k in (0..dim-1):
            E[0, k] = factorial(k) * t.coefficient(x, k)
        R = [0]
        for n in (1..dim-1):
            for k in (0..dim-n-1):
                E[n, k] = E[n-1, k] + E[n-1, k+1]
            R.extend([E[n-k,k] for k in (0..n)])
        return R
    print(SeidelMatrixA099028(10)) # Peter Luschny, Jul 02 2016

Formula

Recurrence: T(k, n) = T(k-1, n) + T(k-1, n+1).

A232933 Number T(n,k) of permutations of [n] with exactly k (possibly overlapping, cyclic wrap-around) occurrences of the consecutive step pattern UDU (U=up, D=down); triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.

Original entry on oeis.org

1, 1, 0, 2, 3, 3, 12, 4, 8, 35, 45, 40, 144, 348, 132, 96, 910, 1862, 1316, 952, 5976, 11600, 14808, 5760, 2176, 39942, 100260, 123606, 63360, 35712, 306570, 919270, 1069910, 910650, 343040, 79360, 2698223, 8427243, 11694397, 10673641, 4477440, 1945856
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2013

Keywords

Examples

			T(2,1) = 2: 12, 21 (the two U's of UDU overlap).
T(3,0) = 3: 132, 213, 321.
T(3,1) = 3: 123, 231, 312.
T(4,0) = 12: 1243, 1342, 1432, 2134, 2143, 2431, 3124, 3214, 3421, 4213, 4312, 4321.
T(4,1) = 4: 1234, 2341, 3412, 4123.
T(4,2) = 8: 1324, 1423, 2314, 2413, 3142, 3241, 4132, 4231.
Triangle T(n,k) begins:
:  0 :      1;
:  1 :      1;
:  2 :      0,      2;
:  3 :      3,      3;
:  4 :     12,      4,       8;
:  5 :     35,     45,      40;
:  6 :    144,    348,     132,     96;
:  7 :    910,   1862,    1316,    952;
:  8 :   5976,  11600,   14808,   5760,   2176;
:  9 :  39942, 100260,  123606,  63360,  35712;
: 10 : 306570, 919270, 1069910, 910650, 343040, 79360;
		

Crossrefs

Column k=0 gives A232899.
Row sums give A000142.
T(2n,n) gives A009752(n) = 2n * A000182(n) for n>0.
T(2n+1,n) gives (2n+1) * A024283(n) for n>0.
Cf. A295987.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0,
         `if`(t=2, x, 1), expand(
          add(b(u+j-1, o-j, 2)*`if`(t=3, x, 1), j=1..o)+
          add(b(u-j, o+j-1, `if`(t=2, 3, 1)), j=1..u)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))
            (`if`(n<2, 1, n* b(0, n-1, 1))):
    seq(T(n), n=0..12);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, If[t == 2, x, 1], Expand[Sum[ b[u + j - 1, o - j, 2]*If[t == 3, x, 1], {j, 1, o}] + Sum[b[u - j, o + j - 1, If[t == 2, 3, 1]], {j, 1, u}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]   [If[n < 2, 1, n*b[0, n - 1, 1]]];
    T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)

A009725 Expansion of e.g.f.: tan(x)*(1+x).

Original entry on oeis.org

0, 1, 2, 2, 8, 16, 96, 272, 2176, 7936, 79360, 353792, 4245504, 22368256, 313155584, 1903757312, 30460116992, 209865342976, 3777576173568, 29088885112832, 581777702256640, 4951498053124096, 108932957168730112, 1015423886506852352, 24370173276164456448
Offset: 0

Views

Author

Keywords

Crossrefs

a(2n) = A009752(n), a(2n+1) = A000182(n+1).

Programs

  • Mathematica
    With[{nn=30},CoefficientList[Series[Tan[x]*(1+x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Oct 29 2020 *)

Formula

E.g.f.: x*(1+x)*Q(0), where Q(k) = 1 - x^2/(x^2 - (2*k+1)*(2*k+3)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Dec 16 2013

Extensions

Definition clarified and prior Mathematica program replaced by Harvey P. Dale, Oct 29 2020

A011248 Twice A000364.

Original entry on oeis.org

2, 2, 10, 122, 2770, 101042, 5405530, 398721962, 38783024290, 4809759350882, 740742376475050, 138697748786275802, 31029068327114173810, 8174145018586247784722, 2504519282807259730936570, 883087786498046209107365642, 355038783159078578873329579330, 161446598471775796124336494906562
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := (-1)^n 4 Im[PolyLog[-2 n, I]];
    Table[a[n], {n, 0, 17}] (* Peter Luschny, Aug 18 2021 *)

Formula

E.g.f.: 2 - 2/Q(0), where Q(k)= 1 - (2*k+1)*(2*k+2)/x + 1/x*(2*k+1)*(2*k+2)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 01 2013
From Peter Luschny, Aug 18 2021: (Start)
a(n) = (-1)^n*4^(2*n+1)*(Bernoulli(2*n+1, 3/4) - Bernoulli(2*n+1, 1/4))/(2*n+1).
a(n) = (-1)^n*4*Im(PolyLog(-2*n, i)). (End)

A243963 a(n) = n*4^n*(-Z(1-n, 1/4)/2 + Z(1-n, 3/4)/2 - Z(1-n, 1)*(1 - 2^(-n))) for n > 0 and a(0) = 0, where Z(n, c) is the Hurwitz zeta function.

Original entry on oeis.org

0, 0, 2, 3, -8, -25, 96, 427, -2176, -12465, 79360, 555731, -4245504, -35135945, 313155584, 2990414715, -30460116992, -329655706465, 3777576173568, 45692713833379, -581777702256640, -7777794952988025, 108932957168730112, 1595024111042171723, -24370173276164456448
Offset: 0

Views

Author

Paul Curtz, Jun 16 2014

Keywords

Comments

Previous name was: 0 followed by -(n+1)*A163747(n).
Difference table of a(n):
0, 0, 2, 3, -8, -25,...
0, 2, 1, -11, -17, 121,...
2, -1, -12, -6, 138, 210,...
-3, -11, 6, 144, 72, -3144,...
-8, 17, 138, -72, -3216, -1608,...
25, 121, -210, -3144, 1608,...
a(n) is an autosequence of second kind. Its inverse binomial transform is the signed sequence. Its main diagonal is the first upper diagonal multiplied by 2.

Crossrefs

Programs

  • Maple
    a := n -> `if`(n=0, 0, n*4^n*(-Zeta(0, 1-n, 1/4)/2 + Zeta(0, 1-n, 3/4)/2 + Zeta(1-n)*(2^(-n)-1))): seq(a(n), n=0..24); # Peter Luschny, Jul 21 2020
  • Mathematica
    a[0] = 0; a[n_] := -n*SeriesCoefficient[(2*E^x*(1 - E^x))/(1 + E^(2*x)), {x, 0, n-1}]*(n-1)!; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jun 17 2014 *)

Formula

a(n) = 0, 0, followed by (period 4: repeat 1, 1, -1, -1)*A065619(n+2).
a(2n) = (-1)^(n+1)A009752(n). a(2n+1) = (-1)^n*A009843(n+1).

Extensions

New name by Peter Luschny, Jul 21 2020

A296543 Expansion of e.g.f. tanh(exp(x)-1).

Original entry on oeis.org

0, 1, 1, -1, -11, -33, 61, 1367, 7253, -12561, -580499, -4701497, 4669765, 580325215, 6636339165, 1365901495, -1122870368715, -17289945450289, -31110588453299, 3713822629274023, 74717183313957413, 280555705771423039, -19253195126787261507, -496715617694137066089, -3008746115751273626347
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 15 2017

Keywords

Examples

			tanh(exp(x)-1) = x/1! + x^2/2! - x^3/3! - 11*x^4/4! - 33*x^5/5! + 61*x^6/6! + 1367*x^7/7! + ...
		

Crossrefs

Programs

  • Maple
    a:=series(tanh(exp(x)-1),x=0,25): seq(n!*coeff(a,x,n),n=0..24); # Paolo P. Lava, Mar 27 2019
  • Mathematica
    nmax = 24; CoefficientList[Series[Tanh[Exp[x] - 1], {x, 0, nmax}], x] Range[0, nmax]!
    nmax = 24; CoefficientList[Series[Sinh[Exp[x] - 1]/Cosh[Exp[x] - 1], {x, 0, nmax}], x] Range[0, nmax]!
    nmax = 24; CoefficientList[Series[(Exp[x] - 1)/(1 + ContinuedFractionK[(Exp[x] - 1)^2, 2 k - 1, {k, 2, nmax}]), {x, 0, nmax}], x] Range[0, nmax]!

Formula

E.g.f.: sinh(exp(x)-1)/cosh(exp(x)-1).
E.g.f.: (exp(x)-1)/(1 + (exp(x)-1)^2/(3 + (exp(x)-1)^2/(5 + (exp(x)-1)^2/(7 + (exp(x)-1)^2/(9 + ...))))), a continued fraction.
Showing 1-8 of 8 results.