[go: up one dir, main page]

login
A236399
Left factorial !p, where p = prime(n).
3
2, 4, 34, 874, 4037914, 522956314, 22324392524314, 6780385526348314, 1177652997443428940314, 316196664211373618851684940314, 274410818470142134209703780940314, 382630662501032184766604355445682020940314, 836850334330315506193242641144055892504420940314
OFFSET
1,1
LINKS
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
A subsequence of A003422.
Sequence in context: A306582 A103625 A006989 * A132529 A027681 A348094
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Jan 29 2014
STATUS
approved