A341681 Successive approximations up to 3^n for the 3-adic integer Sum_{k>=0} k!.
0, 1, 1, 10, 64, 145, 145, 874, 3061, 3061, 42427, 42427, 396721, 928162, 4116808, 4116808, 4116808, 4116808, 262397134, 1037238112, 1037238112, 8010806914, 8010806914, 8010806914, 196297164568, 478726701049, 2173303919935, 2173303919935, 2173303919935, 25050096374896, 162310851104662
Offset: 0
Keywords
Examples
For n = 11, since 3^11 divides 27!, we have a(11) = (Sum_{k=0..26} k!) mod 3^11 = 42427. For n = 24, since 3^24 divides 54!, we have a(24) = (Sum_{k=0..53} k!) mod 3^24 = 196297164568.
Links
- Jianing Song, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
PARI
a(n) = my(p=3); 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 3^n, where m = 2*(n + floor(log_3(2*n))).
Comments