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.

A163940 Triangle related to the divergent series 1^m*1! - 2^m*2! + 3^m*3! - 4^m*4! + ... for m >= -1.

This page as a plain text file.
%I A163940 #25 Jun 16 2025 08:57:49
%S A163940 1,1,0,1,2,0,1,5,3,0,1,9,17,4,0,1,14,52,49,5,0,1,20,121,246,129,6,0,1,
%T A163940 27,240,834,1039,321,7,0,1,35,428,2250,5037,4083,769,8,0,1,44,707,
%U A163940 5214,18201,27918,15274,1793,9,0,1,54,1102,10829,54111,133530,145777,55152,4097,10,0
%N A163940 Triangle related to the divergent series 1^m*1! - 2^m*2! + 3^m*3! - 4^m*4! + ... for m >= -1.
%C A163940 The divergent series g(x,m) = Sum_{k >= 1} (-1)^(k+1)*k^m*k!*x^k, m >= -1, are related to the higher order exponential integrals E(x,m,n=1), see A163931.
%C A163940 Hardy, see the link below, describes how Euler came to the rather surprising conclusion that g(x,-1) = exp(1/x)*Ei(1,1/x) with Ei(1,x) = E(x,m=1,n=1). From this result it follows inmediately that g(x,0) = 1 - g(x,-1). Following in Euler's footsteps we discovered that g(x,m) = (-1)^(m) * (M(x,m)*x - ST(x,m)* Ei(1,1/x) * exp(1/x))/x^(m+1), m => -1.
%C A163940 So g(x=1,m) = (-1)^m*(A040027(m) - A000110 (m+1)*A073003), with A040027(m = -1) = 0. We observe that A073003 = - exp(1)*Ei(-1) is Gompertz's constant, A000110 are the Bell numbers and A040027 was published a few years ago by Gould.
%C A163940 The polynomial coefficients of the M(x,m) = Sum_{k = 0..m} a(m,k) * x^k, for m >= 0, lead to the triangle given above. We point out that M(x,m=-1) = 0.
%C A163940 The polynomial coefficients of the ST(x,m) = Sum_{k = 0..m+1} S2(m+1, k) * x^k, m >= -1, lead to the Stirling numbers of the second kind, see A106800.
%C A163940 The formulas that generate the coefficients of the left hand columns lead to the Minkowski numbers A053657. We have a closer look at them in A163972.
%C A163940 The right hand columns have simple generating functions, see the formulas. We used them in the first Maple program to generate the triangle coefficients (n >= 0 and 0 <= k <= n). The second Maple program calculates the values of g(x,m) for m >= -1, at x=1.
%H A163940 G. H. Hardy, <a href="http://www.archive.org/texts/flipbook/flippy.php?id=divergentseries033523mbp">Divergent Series</a>, Oxford University Press, 1949. pp. 26-29 and pp. 7-8.
%H A163940 Maurice de Gosson, Branko Dragovich and Andrei Khrennikov, <a href="https://arxiv.org/abs/math-ph/0010023">Some p-adic differential equations</a>, (see Section 5), arxiv:math-ph/0010023, Oct 2000.
%F A163940 The generating functions of the right hand columns are Gf(p, x) = 1/((1 - (p-1)*x)^2 * Product_{k = 1..p-2} (1-k*x) ); Gf(1, x) = 1. For the first right hand column p = 1, for the second p = 2, etc..
%F A163940 From _Peter Bala_, Jul 23 2013: (Start)
%F A163940 Conjectural explicit formula: T(n,k) = Stirling2(n,n-k) + (n-k)*Sum_{j = 0..k-1} (-1)^j*Stirling2(n, n+1+j-k)*j! for 0 <= k <= n.
%F A163940 The n-th row polynomial R(n,x) appears to satisfy the recurrence equation R(n,x) = n*x^(n-1) + Sum_{k = 1..n-1} binomial(n,k+1)*x^(n-k-1)*R(k,x). The row polynomials appear to have only real zeros. (End)
%e A163940 The first few triangle rows are:
%e A163940   [1]
%e A163940   [1, 0]
%e A163940   [1, 2, 0]
%e A163940   [1, 5, 3, 0]
%e A163940   [1, 9, 17, 4, 0]
%e A163940   [1, 14, 52, 49, 5, 0]
%e A163940 The first few M(x,m) are:
%e A163940   M(x,m=0) = 1
%e A163940   M(x,m=1) = 1 + 0*x
%e A163940   M(x,m=2) = 1 + 2*x + 0*x^2
%e A163940   M(x,m=3) = 1 + 5*x + 3*x^2 + 0*x^3
%e A163940 The first few ST(x,m) are:
%e A163940   ST(x,m=-1) = 1
%e A163940   ST(x,m=0) = 1 + 0*x
%e A163940   ST(x,m=1) = 1 + 1*x + 0*x^2
%e A163940   ST(x,m=2) = 1 + 3*x + x^2 + 0*x^3
%e A163940   ST(x,m=3) = 1 + 6*x + 7*x^2 + x^3 + 0*x^4
%e A163940 The first few g(x,m) are:
%e A163940   g(x,-1) = (-1)*(- (1)*Ei(1,1/x)*exp(1/x))/x^0
%e A163940   g(x,0) = (1)*((1)*x - (1)*Ei(1,1/x)*exp(1/x))/x^1
%e A163940   g(x,1) = (-1)*((1)*x - (1+ x)*Ei(1,1/x)*exp(1/x))/x^2
%e A163940   g(x,2) = (1)*((1+2*x)*x - (1+3*x+x^2)*Ei(1,1/x)*exp(1/x))/x^3
%e A163940   g(x,3) = (-1)*((1+5*x+3*x^2)*x - (1+6*x+7*x^2+x^3)*Ei(1,1/x)*exp(1/x))/x^4
%p A163940 nmax := 10; for p from 1 to nmax do Gf(p) := convert(series(1/((1-(p-1)*x)^2*product((1-k1*x), k1=1..p-2)), x, nmax+1-p), polynom); for q from 0 to nmax-p do a(p+q-1, q) := coeff(Gf(p), x, q) od: od: seq(seq(a(n, k), k=0..n), n=0..nmax-1);
%p A163940 # End program 1
%p A163940 nmax1:=nmax; A040027 := proc(n): if n = -1 then 0 elif n= 0 then 1 else add(binomial(n, k1-1)*A040027(n-k1), k1 = 1..n) fi: end: A000110 := proc(n) option remember; if n <= 1 then 1 else add( binomial(n-1, i) * A000110(n-1-i), i=0..n-1); fi; end: A073003 := - exp(1) * Ei(-1): for n from -1 to nmax1 do g(1, n) := (-1)^n * (A040027(n) - A000110(n+1) * A073003) od;
%p A163940 # End program 2
%t A163940 nmax = 11;
%t A163940 For[p = 1, p <= nmax, p++, gf = 1/((1-(p-1)*x)^2*Product[(1-k1*x), {k1, 1, p-2}]) + O[x]^(nmax-p+1) // Normal; For[q = 0, q <= nmax-p, q++, a[p+q-1, q] = Coefficient[gf, x, q]]];
%t A163940 Table[a[n, k], {n, 0, nmax-1}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 02 2019, from 1st Maple program *)
%Y A163940 The row sums equal A040027 (Gould).
%Y A163940 A000007, A000027, A000337, A163941 and A163942 are the first five right hand columns.
%Y A163940 A000012, A000096, A163943 and A163944 are the first four left hand columns.
%Y A163940 Cf. A163931, A163972, A106800 (Stirling2), A000110 (Bell), A073003 (Gompertz), A053657 (Minkowski), A014619.
%K A163940 easy,nonn,tabl
%O A163940 0,5
%A A163940 _Johannes W. Meijer_, Aug 13 2009
%E A163940 Edited by _Johannes W. Meijer_, Sep 23 2012