OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..87
Romeo Mestrovic, Variations of Kurepa's left factorial hypothesis, arXiv:1312.7037 [math.NT], 2013.
FORMULA
a(n) = Sum_{k=0..prime(n)-1} k!. - G. C. Greubel, Mar 29 2019
MAPLE
lf:=n->add(k!, k=0..n-1);
[seq(lf(ithprime(n)), n=1..30)];
# 2nd program:
A236399 := proc(n)
A003422(ithprime(n)) ;
end proc:
seq(A236399(n), n=1..5) ; # R. J. Mathar, Dec 19 2016
MATHEMATICA
leftFac[n_] := Sum[k!, {k, 0, n - 1}];
a[n_] := leftFac[Prime[n]];
Array[a, 13] (* Jean-François Alcover, Nov 24 2017 *)
PROG
(PARI) vector(15, n, sum(k=0, prime(n)-1, k!)) \\ G. C. Greubel, Mar 29 2019
(Magma) [(&+[Factorial(k): k in [0..(NthPrime(n)-1)]]): n in [1..15]]; // G. C. Greubel, Mar 29 2019
(Sage) [sum(factorial(k) for k in (0..(nth_prime(n)-1))) for n in (1..15)] # G. C. Greubel, Mar 29 2019
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Jan 29 2014
STATUS
approved