login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005451 a(n)=1 if n is a prime number, otherwise a(n)=n. 5
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, 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, 1, 54, 55, 56, 57, 58, 1, 60 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Denominator of (1 + Gamma(n))/n.
REFERENCES
Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.
LINKS
Achilleas Sinefakopoulos, Problem 10578 (Submitted solution.)
H. S. Wilf, Problem 10578, Amer. Math. Monthly, 104 (1997), 270.
FORMULA
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)).
a(n) = A088140(n), n >= 3. - R. J. Mathar, Oct 28 2008
a(n) = gcd(n, (n!*n!!)/n^2). - Lechoslaw Ratajczak, Mar 09 2019
MAPLE
seq(denom((1 + (n-1)!)/n), n=1..80); # G. C. Greubel, Nov 22 2022
MATHEMATICA
Table[If[PrimeQ[n], 1, n], {n, 70}] (* Vincenzo Librandi, Feb 22 2013 *)
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 *)
Table[Denominator[(1 + Gamma[n])/n], {n, 2, 70}] (* G. C. Greubel, Nov 22 2022 *)
PROG
(Magma) [IsPrime(n) select 1 else n: n in [1..70]]; // Vincenzo Librandi, Feb 22 2013
(Magma) [Denominator((1 + Factorial(n-1))/n): n in [1..70]]; // G. C. Greubel, Nov 22 2022
(Sage)
def A005451(n):
if n == 4: return n
f = factorial(n-1)
return 1/((f + 1)/n - f//n)
[A005451(n) for n in (1..71)] # Peter Luschny, Oct 16 2013
(SageMath) [denominator((1+gamma(n))/n) for n in range(1, 71)] # G. C. Greubel, Nov 22 2022
CROSSREFS
Cf. A005450 (numerators).
Sequence in context: A324118 A100796 A354433 * A135683 A113520 A232597
KEYWORD
nonn,frac
AUTHOR
EXTENSIONS
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
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:49 EDT 2024. Contains 371936 sequences. (Running on oeis4.)