A341680 Successive approximations up to 2^n for the 2-adic integer Sum_{k>=0} k!.
0, 0, 2, 2, 10, 26, 26, 26, 26, 26, 538, 538, 2586, 6682, 14874, 31258, 64026, 129562, 129562, 391706, 915994, 1964570, 4061722, 8256026, 8256026, 8256026, 8256026, 8256026, 142473754, 410909210, 947780122, 2021521946, 4169005594, 8463972890, 8463972890, 25643842074
Offset: 0
Keywords
Examples
For n = 9, since 2^9 divides 12!, we have a(9) = (Sum_{k=0..11} k!) mod 2^9 = 26. For n = 12, since 2^12 divides 16!, we have a(12) = (Sum_{k=0..15} k!) mod 2^12 = 2586.
Links
- Jianing Song, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
PARI
a(n) = my(p=2); 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 2^n, where m = n + floor(log_2(n)).
Comments