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.

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

This page as a plain text file.
%I A341680 #13 Dec 22 2024 17:45:18
%S A341680 0,0,2,2,10,26,26,26,26,26,538,538,2586,6682,14874,31258,64026,129562,
%T A341680 129562,391706,915994,1964570,4061722,8256026,8256026,8256026,8256026,
%U A341680 8256026,142473754,410909210,947780122,2021521946,4169005594,8463972890,8463972890,25643842074
%N A341680 Successive approximations up to 2^n for the 2-adic integer Sum_{k>=0} k!.
%C A341680 a(n) == Sum_{k>=0} k! (mod 2^n). Since k! mod 2^n is eventually zero, a(n) is well-defined.
%C A341680 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 A341680 Jianing Song, <a href="/A341680/b341680.txt">Table of n, a(n) for n = 0..1000</a>
%F A341680 For n > 0, a(n) = (Sum_{k=0..m} k!) mod 2^n, where m = n + floor(log_2(n)).
%e A341680 For n = 9, since 2^9 divides 12!, we have a(9) = (Sum_{k=0..11} k!) mod 2^9 = 26.
%e A341680 For n = 12, since 2^12 divides 16!, we have a(12) = (Sum_{k=0..15} k!) mod 2^12 = 2586.
%o A341680 (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))))
%Y A341680 Cf. A341684 (digits of Sum_{k>=0} k!).
%Y A341680 Successive approximations for the p-adic integer Sum_{k>=0} k!: A341680 (this sequence), A341681 (p=3), A341682 (p=5), A341683 (p=7).
%Y A341680 Cf. A007843 (least positive integer k for which 2^n divides k!).
%K A341680 nonn
%O A341680 0,3
%A A341680 _Jianing Song_, Feb 17 2021