Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #37 Sep 16 2022 15:26:40
%S -4,-2,-4,2,-20,86,-532,3706,-29668,266990,-2669924,29369138,
%T -352429684,4581585862,-64142202100,962133031466,-15394128503492,
%U 261700184559326,-4710603322067908,89501463119290210,-1790029262385804244
%N Equivalent of the Kurepa hypothesis for left factorial.
%C For a prime p > 2 we have !p == -a(p) mod p, where the left factorial !n = Sum_{k=0..n-1} k! (A003422).
%H James Spahlinger, <a href="/A056158/b056158.txt">Table of n, a(n) for n = 3..100</a>
%H Romeo Mestrovic, <a href="http://arxiv.org/abs/1312.7037">Variations of Kurepa's left factorial hypothesis</a>, arXiv:1312.7037 [math.NT], 2013.
%H Romeo Mestrovic, <a href="https://doi.org/10.2298/FIL1510207M">The Kurepa-Vandermonde matrices arising from Kurepa's left factorial hypothesis</a>, Filomat 29:10 (2015), 2207-2215; DOI 10.2298/FIL1510207M.
%F a(3) = -4, a(n) = -(n-3)*a(n-1) - 2*(n-1).
%F a(n) = 2*(-1)^(n-1)*(n-3)!*Sum_{k=0..n-3} frac((k+2)*(-1)^(k+1))*k!.
%F 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
%F a(n) ~ (-1)^n * 2 * exp(-1) * (n-3)!. - _Vaclav Kotesovec_, Jan 05 2019
%F G.f.: 2*x^2*(exp(-1+1/x) * Exponential-Integral((x-1)/x) + x/(x-1)). - _G. C. Greubel_, Mar 29 2019
%t a[3] = -4; a[n_]:= -(n-3)*a[n-1] - 2*(n-1); Array[a, 30, 3] (* _James Spahlinger_, Feb 20 2016 *)
%t 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 *)
%o (Magma) [n eq 3 select -4 else -(n-3)*Self(n-3)-2*(n-1): n in [3..30]]; // _Vincenzo Librandi_, Feb 22 2016
%o (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
%o (Sage)
%o @CachedFunction
%o def Self(n):
%o if n == 3 : return -4
%o return -(n-3)*Self(n-1) - 2*(n-1)
%o [Self(n) for n in (3..30)] # _G. C. Greubel_, Mar 29 2019
%K sign,easy
%O 3,1
%A _Aleksandar Petojevic_, Jul 31 2000
%E More terms from Larry Reeves (larryr(AT)acm.org), Oct 03 2000