|
|
A056158
|
|
Equivalent of the Kurepa hypothesis for left factorial.
|
|
2
|
|
|
-4, -2, -4, 2, -20, 86, -532, 3706, -29668, 266990, -2669924, 29369138, -352429684, 4581585862, -64142202100, 962133031466, -15394128503492, 261700184559326, -4710603322067908, 89501463119290210, -1790029262385804244
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,1
|
|
COMMENTS
|
For a prime p > 2 we have !p == -a(p) mod p, where the left factorial !n = Sum_{k=0..n-1} k! (A003422).
|
|
LINKS
|
|
|
FORMULA
|
a(3) = -4, a(n) = -(n-3)*a(n-1) - 2*(n-1).
a(n) = 2*(-1)^(n-1)*(n-3)!*Sum_{k=0..n-3} frac((k+2)*(-1)^(k+1))*k!.
Conjecture: a(n) + (n-5)*a(n-1) + (-2*n+9)*a(n-2) + (n-5)*a(n-3) = 0. - R. J. Mathar, Jan 31 2014
G.f.: 2*x^2*(exp(-1+1/x) * Exponential-Integral((x-1)/x) + x/(x-1)). - G. C. Greubel, Mar 29 2019
|
|
MATHEMATICA
|
a[3] = -4; a[n_]:= -(n-3)*a[n-1] - 2*(n-1); Array[a, 30, 3] (* James Spahlinger, Feb 20 2016 *)
Drop[CoefficientList[Series[2*x^2*(Exp[1/x -1]*ExpIntegralEi[(x-1)/x] + x/(x-1)), {x, 0, 15}, Assumptions -> x > 0], x], 3] (* G. C. Greubel, Mar 29 2019 *)
|
|
PROG
|
(Magma) [n eq 3 select -4 else -(n-3)*Self(n-3)-2*(n-1): n in [3..30]]; // Vincenzo Librandi, Feb 22 2016
(PARI) m=30; v=concat([-4], vector(m-1)); for(n=2, m, v[n]=-(n-1)*v[n-1] -2*(n+1)); v \\ G. C. Greubel, Mar 29 2019
(Sage)
@CachedFunction
def Self(n):
if n == 3 : return -4
return -(n-3)*Self(n-1) - 2*(n-1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Larry Reeves (larryr(AT)acm.org), Oct 03 2000
|
|
STATUS
|
approved
|
|
|
|