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.

A096622 Harmonic expansion (or factorial expansion) of the Euler-Mascheroni constant.

This page as a plain text file.
%I A096622 #21 Feb 16 2025 08:32:53
%S A096622 0,1,0,1,4,1,4,1,3,0,2,3,0,5,14,12,16,14,7,13,18,17,19,11,22,13,13,26,
%T A096622 12,16,2,26,1,2,28,18,3,27,31,27,9,7,37,28,13,26,2,34,29,47,49,34,39,
%U A096622 10,0,42,1,9,42,1,32,61,23,57,42,32,2,12,32,32,48,42,49,15,14,39,48
%N A096622 Harmonic expansion (or factorial expansion) of the Euler-Mascheroni constant.
%H A096622 G. C. Greubel, <a href="/A096622/b096622.txt">Table of n, a(n) for n = 1..10000</a>
%H A096622 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HarmonicExpansion.html">Harmonic Expansion</a>
%H A096622 <a href="https://oeis.org/index/Fa#facbase">Index entries for factorial base representation</a>
%F A096622 Sum_{n>=1} a(n)/n! = Euler gamma = A001620. - _G. C. Greubel_, Nov 26 2018
%e A096622 Euler gamma = 0 + 1/2! + 0/3! + 1/4! + 4/5! + 1/6! + 4/7! + 1/8! + ...
%t A096622 With[{b = EulerGamma}, Table[If[n==1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* _G. C. Greubel_, Nov 26 2018 *)
%o A096622 (PARI) default(realprecision, 250); b = Euler; for(n=1, 80, print1( if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ _G. C. Greubel_, Nov 26 2018
%o A096622 (Magma) SetDefaultRealField(RealField(250));  [Floor(EulerGamma(250))] cat [Floor(Factorial(n)*EulerGamma(250)) - n*Floor(Factorial((n-1))*EulerGamma(250)) : n in [2..80]]; // _G. C. Greubel_, Nov 26 2018
%o A096622 (Sage)
%o A096622 b = euler_gamma;
%o A096622 def A096622(n):
%o A096622     if (n==1): return floor(b)
%o A096622     else: return expand(floor(factorial(n)*b) -n*floor(factorial(n-1)*b))
%o A096622 [A096622(n) for n in (1..80)] # _G. C. Greubel_, Nov 26 2018
%Y A096622 Cf. A001620 (decimal expansion), A002852 (continued fraction).
%K A096622 nonn
%O A096622 1,5
%A A096622 _Eric W. Weisstein_, Jul 01 2004