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.
%I A341682 #10 Feb 19 2021 03:38:30 %S A341682 0,4,14,64,314,2814,2814,2814,237189,1018439,1018439,10784064, %T A341682 10784064,743205939,1963909064,20274455939,142344768439,142344768439, %U A341682 142344768439,7771739299689,64992198284064,446461924846564,1876973399455939,4261159190471564,16182088145549689,16182088145549689 %N A341682 Successive approximations up to 5^n for the 5-adic integer Sum_{k>=0} k!. %C A341682 a(n) == Sum_{k>=0} k! (mod 5^n). Since k! mod 5^n is eventually zero, a(n) is well-defined. %C A341682 In general, for every prime p, the p-adic integer x = Sum_{k>=0} k! is well-defined. To find the approximation up to p^n (n > 0) for x, it is enough to add k! for 0 <= k <= m and then find the remainder of the sum modulo p^n, where m = (p - 1)*(n + floor(log_p((p-1)*n))). This is because p^n divides (m+1)! %H A341682 Jianing Song, <a href="/A341682/b341682.txt">Table of n, a(n) for n = 0..1000</a> %F A341682 For n > 0, a(n) = (Sum_{k=0..m} k!) mod 5^n, where m = 4*(n + floor(log_5(4*n))). %e A341682 For n = 7, since 5^7 divides 30!, we have a(7) = (Sum_{k=0..29} k!) mod 5^7 = 2814. %e A341682 For n = 29, since 5^29 divides 125!, we have a(29) = (Sum_{k=0..124} k!) mod 5^29 = 173465698384532268439. %o A341682 (PARI) a(n) = my(p=5); if(n==0, 0, lift(sum(k=0, (p-1)*(n+logint((p-1)*n, p)), Mod(k!, p^n)))) %Y A341682 Cf. A341686 (digits of Sum_{k>=0} k!). %Y A341682 Successive approximations for the p-adic integer Sum_{k>=0} k!: A341680 (p=2), A341681 (p=3), this sequence (p=5), A341683 (p=7). %Y A341682 Cf. A007845 (least positive integer k for which 2^n divides k!). %K A341682 nonn %O A341682 0,2 %A A341682 _Jianing Song_, Feb 17 2021