%I #29 Dec 29 2023 11:54:24
%S 1,1,1,2,1,2,1,10,1,2,1,2,5,2,1,2,1,10,1,2,1,2,5,26,1,2,1,10,1,2,1,2,
%T 5,2,1,2,13,10,1,2,1,2,5,2,1,2,1,10,1,26,1,2,5,2,1,2,1,10,1,2,1,2,65,
%U 2,1,2,1,10,1,2,1,74,5,2,1,26,1,10,1,2,1,2,5,2,1,2,1,10,13,2,1,2,5,2,1,2,1
%N a(n) = gcd(A093101(n), A093101(n+2)) where A093101(n) = gcd(n!, A(n)) and A(n) = A000522(n) = Sum_{k=0..n} n!/k!.
%C a(n) divides n+3 because A(n+2) = (n+2)(n+1)*A(n) + n+3.
%H Antti Karttunen, <a href="/A124781/b124781.txt">Table of n, a(n) for n = 0..4096</a>
%H J. Sondow, <a href="http://www.jstor.org/stable/27642006">A geometric proof that e is irrational and a new measure of its irrationality</a>, Amer. Math. Monthly 113 (2006) 637-641.
%H J. Sondow, <a href="http://arxiv.org/abs/0704.1282">A geometric proof that e is irrational and a new measure of its irrationality</a>, arXiv:0704.1282 [math.HO], 2007-2010.
%H J. Sondow and K. Schalm, <a href="http://arxiv.org/abs/0709.0671">Which partial sums of the Taylor series for e are convergents to e? (and a link to the primes 2, 5, 13, 37, 463), II</a>, Gems in Experimental Mathematics (T. Amdeberhan, L. A. Medina, and V. H. Moll, eds.), Contemporary Mathematics, vol. 517, Amer. Math. Soc., Providence, RI, 2010.
%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>
%F a(n) = gcd(A093101(n), A093101(n+2)) = (n+3)/A123901(n).
%F a(n) = gcd(A(n), A(n+2), n!) where A(n)=1+n+n(n-1)+...+n!. - _Jonathan Sondow_, Nov 13 2006
%e a(3) = gcd(d(3),d(5)) = gcd(gcd(3!,16), gcd(5!,326)) = gcd(2,2) = 2.
%t (A[n_] := Sum[n!/k!, {k,0,n}]; d[n_] := GCD[n!,A[n]]; Table[GCD[d[n],d[n+2]], {n,0,100}])
%t (* Second program, faster: *)
%t Table[GCD @@ Map[GCD[#!, Floor[E*#!] - Boole[# == 0]] &, n + {0, 2}], {n, 0, 96}] (* _Michael De Vlieger_, Jul 12 2017 *)
%o (PARI)
%o A000522(n) = sum(k=0, n, binomial(n, k)*k!); \\ This function from _Joerg Arndt_, Dec 14 2014
%o A093101(n) = gcd(n!,A000522(n));
%o m1=m2=1; for(n=0,4096,m=m1; m1=m2; m2 = A093101(n+2); m124781 = gcd(m,m2); write("b093101.txt", n, " ", m); write("b124781.txt", n, " ", m124781); write("b123901.txt", n, " ", (n+3)/m124781)); \\ _Antti Karttunen_, Jul 12 2017
%Y Cf. A000522, A093101, A123899, A123900, A123901, A124779, A124780, A124782.
%K nonn
%O 0,4
%A _Jonathan Sondow_, Nov 07 2006
%E Replaced d(n) in the name with A093101(n). - _Antti Karttunen_, Jul 12 2017