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.
%I A005451 #43 Jun 21 2025 18:53:56 %S A005451 1,1,1,4,1,6,1,8,9,10,1,12,1,14,15,16,1,18,1,20,21,22,1,24,25,26,27, %T A005451 28,1,30,1,32,33,34,35,36,1,38,39,40,1,42,1,44,45,46,1,48,49,50,51,52, %U A005451 1,54,55,56,57,58,1,60 %N A005451 a(n) = 1 if n is a prime number, otherwise a(n) = n. %C A005451 Denominator of (1 + Gamma(n))/n. %C A005451 Möbius transform of A380441(n). - _Wesley Ivan Hurt_, Jun 21 2025 %D A005451 Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106. %H A005451 G. C. Greubel, <a href="/A005451/b005451.txt">Table of n, a(n) for n = 1..5000</a> %H A005451 Achilleas Sinefakopoulos, <a href="https://web.archive.org/web/20010608193230/http://users.forthnet.gr/ath/asin/proandsol.htm">Problem 10578</a> (Submitted solution.) %H A005451 H. S. Wilf, <a href="http://www.jstor.org/stable/2974795">Problem 10578</a>, Amer. Math. Monthly, 104 (1997), 270. %F A005451 Define b(n) = ( (n-1)*(n^2-3*n+1)*b(n-1) - (n-2)^3*b(n-2) )/(n*(n-3)); b(2) = b(3) = 1; a(n) = denominator(b(n)). %F A005451 a(n) = A088140(n), n >= 3. - _R. J. Mathar_, Oct 28 2008 %F A005451 a(n) = gcd(n, (n!*n!!)/n^2). - _Lechoslaw Ratajczak_, Mar 09 2019 %F A005451 From _Wesley Ivan Hurt_, Jun 21 2025: (Start) %F A005451 a(n) = n^c(n), where c = A005171. %F A005451 a(n) = Sum_{d|n} A380441(d) * mu(n/d). (End) %p A005451 seq(denom((1 + (n-1)!)/n), n=1..80); # _G. C. Greubel_, Nov 22 2022 %t A005451 Table[If[PrimeQ[n], 1, n], {n, 70}] (* _Vincenzo Librandi_, Feb 22 2013 *) %t A005451 a[n_] := ((n-1)! + 1)/n - Floor[(n-1)!/n] // Denominator; Table[a[n] , {n, 70}] (* _Jean-François Alcover_, Jul 17 2013, after Minac's formula *) %t A005451 Table[Denominator[(1 + Gamma[n])/n], {n,2,70}] (* _G. C. Greubel_, Nov 22 2022 *) %o A005451 (Magma) [IsPrime(n) select 1 else n: n in [1..70]]; // _Vincenzo Librandi_, Feb 22 2013 %o A005451 (Magma) [Denominator((1 + Factorial(n-1))/n): n in [1..70]]; // _G. C. Greubel_, Nov 22 2022 %o A005451 (Sage) %o A005451 def A005451(n): %o A005451 if n == 4: return n %o A005451 f = factorial(n-1) %o A005451 return 1/((f + 1)/n - f//n) %o A005451 [A005451(n) for n in (1..71)] # _Peter Luschny_, Oct 16 2013 %o A005451 (SageMath) [denominator((1+gamma(n))/n) for n in range(1,71)] # _G. C. Greubel_, Nov 22 2022 %Y A005451 Cf. A005171, A005450 (numerators). %Y A005451 Cf. A088140, A089026, A135684, A181569. %K A005451 nonn,frac %O A005451 1,4 %A A005451 _N. J. A. Sloane_ %E A005451 Name edited and a(1)=1 prepended by _G. C. Greubel_, Nov 22 2022. Name further edited by _N. J. A. Sloane_, Nov 22 2022