A341682 Successive approximations up to 5^n for the 5-adic integer Sum_{k>=0} k!.
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
Offset: 0
Keywords
Examples
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.
Links
- Jianing Song, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
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))))
Formula
For n > 0, a(n) = (Sum_{k=0..m} k!) mod 5^n, where m = 4*(n + floor(log_5(4*n))).
Comments