cp's OEIS Frontend

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.

A341681 Successive approximations up to 3^n for the 3-adic integer Sum_{k>=0} k!.

This page as a plain text file.
%I A341681 #10 Feb 19 2021 03:38:34
%S A341681 0,1,1,10,64,145,145,874,3061,3061,42427,42427,396721,928162,4116808,
%T A341681 4116808,4116808,4116808,262397134,1037238112,1037238112,8010806914,
%U A341681 8010806914,8010806914,196297164568,478726701049,2173303919935,2173303919935,2173303919935,25050096374896,162310851104662
%N A341681 Successive approximations up to 3^n for the 3-adic integer Sum_{k>=0} k!.
%C A341681 a(n) == Sum_{k>=0} k! (mod 3^n). Since k! mod 3^n is eventually zero, a(n) is well-defined.
%C A341681 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 A341681 Jianing Song, <a href="/A341681/b341681.txt">Table of n, a(n) for n = 0..1000</a>
%F A341681 For n > 0, a(n) = (Sum_{k=0..m} k!) mod 3^n, where m = 2*(n + floor(log_3(2*n))).
%e A341681 For n = 11, since 3^11 divides 27!, we have a(11) = (Sum_{k=0..26} k!) mod 3^11 = 42427.
%e A341681 For n = 24, since 3^24 divides 54!, we have a(24) = (Sum_{k=0..53} k!) mod 3^24 = 196297164568.
%o A341681 (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))))
%Y A341681 Cf. A341685 (digits of Sum_{k>=0} k!).
%Y A341681 Successive approximations for the p-adic integer Sum_{k>=0} k!: A341680 (p=2), this sequence (p=3), A341682 (p=5), A341683 (p=7).
%Y A341681 Cf. A007844 (least positive integer k for which 3^n divides k!).
%K A341681 nonn
%O A341681 0,4
%A A341681 _Jianing Song_, Feb 17 2021