login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Duplicate of A005451.
4

%I #30 Nov 22 2022 22:18:46

%S 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 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 1,54,55,56,57,58,1,60,1,62,63

%N Duplicate of A005451.

%C Previous name was: a(n) = 1 if n is a prime number, otherwise, a(n) = n.

%D Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.

%H Vincenzo Librandi, <a href="/A135683/b135683.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A088140(n), n >= 3. - _R. J. Mathar_, Oct 28 2008

%F a(n) = gcd(n, (n!*n!!)/n^2). - _Lechoslaw Ratajczak_, Mar 09 2019

%F a(n) = A005451(n), for n >= 2. - _G. C. Greubel_, Nov 22 2022

%p seq(denom((1 + (n-1)!)/n), n=1..80); # _G. C. Greubel_, Nov 22 2022

%t Table[If[PrimeQ[n], 1, n], {n, 70}] (* _Vincenzo Librandi_, Feb 22 2013 *)

%t 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 *)

%o (Magma) [IsPrime(n) select 1 else n: n in [1..70]]; // _Vincenzo Librandi_, Feb 22 2013

%o (Sage)

%o def A135683(n):

%o if n == 4: return n

%o f = factorial(n-1)

%o return 1/((f + 1)/n - f//n)

%o [A135683(n) for n in (1..63)] # _Peter Luschny_, Oct 16 2013

%K dead

%O 1,4

%A _Mohammad K. Azarian_, Dec 01 2007