OFFSET
1,4
COMMENTS
Previous name was: a(n) = 1 if n is a prime number, otherwise, a(n) = n.
REFERENCES
Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
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
a(n) = A005451(n), for n >= 2. - G. C. Greubel, Nov 22 2022
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, 1, 63}] (* Jean-François Alcover, Jul 17 2013, after Minac's formula *)
PROG
(Magma) [IsPrime(n) select 1 else n: n in [1..70]]; // Vincenzo Librandi, Feb 22 2013
(Sage)
def A135683(n):
if n == 4: return n
f = factorial(n-1)
return 1/((f + 1)/n - f//n)
[A135683(n) for n in (1..63)] # Peter Luschny, Oct 16 2013
CROSSREFS
KEYWORD
dead
AUTHOR
Mohammad K. Azarian, Dec 01 2007
STATUS
approved