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

A226158 a(n) = 2*n*(2^n - 1)*zeta(1-n) where in the case n=0 the limit is understood, zeta(s) the Riemann zeta function.

Original entry on oeis.org

0, -1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073, 0, -38227, 0, 929569, 0, -28820619, 0, 1109652905, 0, -51943281731, 0, 2905151042481, 0, -191329672483963, 0, 14655626154768697, 0, -1291885088448017715, 0, 129848163681107301953
Offset: 0

Views

Author

Peter Luschny, Jun 28 2013

Keywords

Comments

Also known as the Genocchi numbers, apart from a(0) and a(1) same as A036968.
Consider the difference table of a(n), which is a variant of Seidel's Genocchi table A014781:
0 -1 -1 0 1 0 -3 0 17
-1 0 1 1 -1 -3 3 17 -17
1 1 0 -2 -2 6 14 -34 -138
0 -1 -2 0 8 8 -48 -104 448
-1 -1 2 8 0 -56 -56 552 1160
0 3 6 -8 -56 0 608 608 -8832
3 3 -14 -48 56 608 0 -9440 -9440
0 -17 -34 104 552 -608 -9440 0 198272
-17 -17 138 448 -1160 -8832 9440 198272 0
a(n) is an autosequence: its inverse binomial transform is the sequence signed (see A181722). The first column (inverse binomial transform) is 0, followed by -A036968. - Paul Curtz, Jul 22 2013
a(n+1) = p(0) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 1, ..., n+1. - Michael Somos, Apr 23 2014

Examples

			G.f. = - x - x^2 + x^4 - 3*x^6 + 17*x^8 - 155*x^10 + 2073*x^12 - 38227*x^14 + ...
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 50); [0] cat Coefficients(R!(Laplace( -2*x/(1+Exp(-x)) ))); // G. C. Greubel, Apr 22 2023
  • Maple
    seq(n!*coeff(series(-2*x/(1+exp(-x)), x, 34), x, n), n=0..32);
    # Second program:
    A226158 := proc(n) local f; f := z -> Zeta(1-z)*2*z*(2^z-1);
    if n=0 then limit(f(z), z=0) else f(n) fi end: seq(A226158(n), n=0..32);
  • Mathematica
    a[0]=0; a[1]= -1; a[n_]:= n*EulerE[n-1, 0]; Table[a[n], {n,0,32}] (* Jean-François Alcover, Sep 12 2013 *)
    (* Programs from Michael Somos, Apr 23 2014 *)
    a[n_]:= If[n<1, 0, -n*EulerE[n-1, 1]];
    a[n_]:= If[n<0, 0, 2*(1-2^n)*BernoulliB[n,1]]; (* End *)
    Table[2*n*PolyLog[1-n, -1], {n,0,32}] (* Peter Luschny, Aug 17 2021 *)
  • PARI
    my(x='x+O('x^40)); concat([0], Vec(serlaplace(-2*x/(1+exp(-x))))) \\ G. C. Greubel, Jan 19 2018
    
  • Sage
    def A226158(n): return -2*n*zeta(1-n)*(1-2^n) if n != 0 else 0
    [A226158(n) for n in (0..32)]
    # Alternatively:
    def A226158_list(len):
        e, f, R, C = 4, 1, [0], [1]+[0]*(len-1)
        for n in (2..len-1):
            for k in range(n, 0, -1):
                C[k] = -C[k-1] / (k+1)
            C[0] = -sum(C[k] for k in (1..n))
            R.append((2-e)*f*C[0])
            f *= n; e *= 2
        return R
    print(A226158_list(34)) # Peter Luschny, Feb 22 2016
    

Formula

E.g.f.: -2*x/(1+exp(-x)).
a(2n) = -A000367(n)*A090648(n). - Paul Curtz, Jul 22 2013
E.g.f.: -2*x/(1+exp(-x))= -2 - 2*T(0), where T(k) = 4*k-1 + x/( 2 - x/( 4*k+1 + x/( 2 - x/T(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Nov 23 2013
G.f.: conjecture: -x/Q(0),where Q(k) = 1 - x*(k+1)/(1 + x*(k+1)/(1 - x*(k+1)/(1 + x*(k+1)/Q(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Nov 23 2013
a(n) = 2*(1 - 2^n)*Bernoulli(n, 1). - Peter Luschny, Apr 16 2014
a(n) = -n*Euler(n - 1, 1). - Michael Somos, Apr 23 2014
a(n) = 2^n*(Bernoulli(n, 1/2) - Bernoulli(n, 1)). - Peter Luschny, Jul 10 2020
a(n) = 2*n*PolyLog[1 - n, -1] - Peter Luschny, Aug 17 2021

A297703 The Genocchi triangle read by rows, T(n,k) for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 8, 14, 17, 17, 56, 104, 138, 155, 155, 608, 1160, 1608, 1918, 2073, 2073, 9440, 18272, 25944, 32008, 36154, 38227, 38227, 198272, 387104, 557664, 702280, 814888, 891342, 929569, 929569, 5410688, 10623104, 15448416, 19716064, 23281432, 26031912
Offset: 0

Views

Author

Peter Luschny, Jan 03 2018

Keywords

Examples

			The triangle starts:
0: [     1]
1: [     1,      1]
2: [     2,      3,      3]
3: [     8,     14,     17,     17]
4: [    56,    104,    138,    155,    155]
5: [   608,   1160,   1608,   1918,   2073,   2073]
6: [  9440,  18272,  25944,  32008,  36154,  38227,  38227]
7: [198272, 387104, 557664, 702280, 814888, 891342, 929569, 929569]
		

Crossrefs

Row sums are A005439 with offset 0.
T(n,0) = A005439 with A005439(0) = 1.
T(n,n) = A110501 with offset 0.

Programs

  • Julia
    function A297703Triangle(len::Int)
        A = fill(BigInt(0), len+2); A[2] = 1
        for n in 2:len+1
            for k in n:-1:2 A[k] += A[k+1] end
            for k in 2: 1:n A[k] += A[k-1] end
            println(A[2:n])
        end
    end
    println(A297703Triangle(9))
    
  • Python
    from functools import cache
    @cache
    def T(n):  # returns row n
        if n == 0: return [1]
        row = [0] + T(n - 1) + [0]
        for k in range(n, 0, -1): row[k] += row[k + 1]
        for k in range(2, n + 2): row[k] += row[k - 1]
        return row[1:]
    for n in range(9): print(T(n))  # Peter Luschny, Jun 03 2022

A278331 Shifted sequence of second differences of Genocchi numbers.

Original entry on oeis.org

0, -2, -2, 6, 14, -34, -138, 310, 1918, -4146, -36154, 76454, 891342, -1859138, -27891050, 57641238, 1080832286, -2219305810, -50833628826, 103886563462, 2853207760750, -5810302084962, -188424521441482, 382659344967926, 14464296482284734, -29311252309537394, -1277229462293249018
Offset: 0

Views

Author

Keywords

Comments

This is an autosequence of the first kind (array of successive differences shows typical zero diagonal).
Last digits are apparently of period 20.
From A226158(n) for the continuity of autosequences of the first kind.
b(n) = 0, 1, -1, 0, 1, 0, -3, 0, 17, ... = A226158(n) with 1 as second term instead of -1.
c(n) = 0, 0, -1, 0, 1, 0, -3, 0, 17, ... = A226158(n) with 0 as second term instead of -1.
Respective difference tables:
0, -1, -1, 0, 1, 0, -3, 0, 17, ...
-1, 0, 1, 1, -1, -3 , 3, 17, -17, ...
1, 1, 0, -2, -2, 6, 14, -34, -138, ...
etc,
0, 1, -1, 0, 1, 0, -3, 0, 17, ... = 0 followed by A036968(n+1)
1, -2, 1, 1, -1, -3, 3, 17, -17, ...
-3, 3, 0, -2, -2, 6, 14, -34, -138, ...
etc,
0, 0, -1, 0, 1, 0, -3, 0, 17, ...
0, -1, 1, 1, -1, -3, 3, 17, -17, ...
-1, 2, 0, -2, -2, 6, 14, -34, -138, ...
etc.
Since it is in the three tables, a(n) is the core of the Genocchi numbers.

Crossrefs

Cf. A001469, A014781, A036968, A005439 (a(n) second and third diagonals), A164555/A027642, A209308, A226158, A240581(n)/A239315(n) (core of Bernoulli numbers).

Programs

  • Mathematica
    g[0] = 0; g[1] = -1; g[n_] := n*EulerE[n-1, 0]; G = Table[g[n], {n, 0, 30}]; Drop[Differences[G, 2], 2]
    (* or, from Seidel's triangle A014781: *)
    max = 26; T[1, 1] = 1; T[n_, k_] /; 1 <= k <= (n + 1)/2 := T[n, k] = If[EvenQ[n], Sum[T[n - 1, i], {i, k, max}], Sum[T[n - 1, i], {i, 1, k}]]; T[, ] = 0; a[n_] := With[{k = Floor[(n - 1)/2] + 1}, (-1)^k*T[n + 3, k]]; Table[a[n], {n, 0, max}]

Formula

a(n) = (n+2)*E(n+1, 0) - 2*(n+3)*E(n+2, 0) + (n+4)*E(n+3, 0), where E(n,x) is the n-th Euler polynomial.
a(n) = -2*(2^(n+2)-1)*B(n+2) + 4*(2^(n+3)-1)*B(n+3) - 2*(2^(n+4)-1)*B(n+4), where B(n) is the n-th Bernoulli number.
Showing 1-3 of 3 results.