The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A341682 Successive approximations up to 5^n for the 5-adic integer Sum_{k>=0} k!. 5
 0, 4, 14, 64, 314, 2814, 2814, 2814, 237189, 1018439, 1018439, 10784064, 10784064, 743205939, 1963909064, 20274455939, 142344768439, 142344768439, 142344768439, 7771739299689, 64992198284064, 446461924846564, 1876973399455939, 4261159190471564, 16182088145549689, 16182088145549689 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS a(n) == Sum_{k>=0} k! (mod 5^n). Since k! mod 5^n is eventually zero, a(n) is well-defined. 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)! LINKS Jianing Song, Table of n, a(n) for n = 0..1000 FORMULA For n > 0, a(n) = (Sum_{k=0..m} k!) mod 5^n, where m = 4*(n + floor(log_5(4*n))). EXAMPLE For n = 7, since 5^7 divides 30!, we have a(7) = (Sum_{k=0..29} k!) mod 5^7 = 2814. For n = 29, since 5^29 divides 125!, we have a(29) = (Sum_{k=0..124} k!) mod 5^29 = 173465698384532268439. PROG (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)))) CROSSREFS Cf. A341686 (digits of Sum_{k>=0} k!). Successive approximations for the p-adic integer Sum_{k>=0} k!: A341680 (p=2), A341681 (p=3), this sequence (p=5), A341683 (p=7). Cf. A007845 (least positive integer k for which 2^n divides k!). Sequence in context: A149495 A137956 A357793 * A242764 A356004 A154407 Adjacent sequences: A341679 A341680 A341681 * A341683 A341684 A341685 KEYWORD nonn AUTHOR Jianing Song, Feb 17 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 12 16:06 EDT 2024. Contains 375853 sequences. (Running on oeis4.)