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.

Showing 1-3 of 3 results.

A005451 a(n) = 1 if n is a prime number, otherwise a(n) = n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

Denominator of (1 + Gamma(n))/n.
Möbius transform of A380441(n). - Wesley Ivan Hurt, Jun 21 2025

References

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

Crossrefs

Cf. A005171, A005450 (numerators).

Programs

  • 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
    
  • 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 *)
  • 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

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
From Wesley Ivan Hurt, Jun 21 2025: (Start)
a(n) = n^c(n), where c = A005171.
a(n) = Sum_{d|n} A380441(d) * mu(n/d). (End)

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

A092043 a(n) = numerator(n!/n^2).

Original entry on oeis.org

1, 1, 2, 3, 24, 20, 720, 630, 4480, 36288, 3628800, 3326400, 479001600, 444787200, 5811886080, 81729648000, 20922789888000, 19760412672000, 6402373705728000, 6082255020441600, 115852476579840000, 2322315553259520000
Offset: 1

Views

Author

Ralf Stephan, Mar 28 2004

Keywords

Comments

Numerator of expansion of dilog(x) = Li_2(x) = -Integral_{t=0..x} (log(1-t)/t)*dt. See the Weisstein link.
E.g.f. of {a(n)/A014973(n)}_{n>=1} is Li_2(x) (with 0 for n=0).

Crossrefs

Denominator is in A014973.

Programs

  • Magma
    [Numerator(Factorial(n)/n^2): n in [1..30]]; // Vincenzo Librandi, Apr 15 2014
  • Mathematica
    Table[Numerator[n!/n^2], {n, 1, 40}] (* Vincenzo Librandi, Apr 15 2014 *)
    Table[(n-1)!/n,{n,30}]//Numerator (* Harvey P. Dale, Apr 03 2018 *)
  • PARI
    a(n)=numerator(n!/n^2)
    
  • PARI
    a(n)=numerator(polcoeff(serlaplace(dilog(x)),n))
    

Formula

From Wolfdieter Lang, Apr 28 2017: (Start)
a(n) = numerator(n!/n^2) = numerator((n-1)!/n), n >= 1. See the name.
E.g.f. {a(n)/A014973(n)}_{n>=1} with 0 for n=0 is Li_2(x). See the comment.
(-1)^n*a(n+1)/A014973(n+1) = (-1)^n*n!/(n+1) = Sum_{k=0..n} Stirling1(n, k)*Bernoulli(k), with Stirling1 = A048994 and Bernoulli(k) = A027641(k)/A027642(k), n >= 0. From inverting the formula for B(k) in terms of Stirling2 = A048993.(End)
From Wolfdieter Lang, Oct 26 2022: (Start)
a(n) = (n-1)!/gcd(n,(n-1)!) = A000142(n-1)/A181569(n-1), n >= 1.
The expansion of (1+x)*exp(x) has coefficients A014973(n+1)/a(n+1), for n >= 0. (End)

Extensions

Comment rewritten by Wolfdieter Lang, Apr 28 2017

A238002 Count with multiplicity of prime factors of n in (n - 1)!.

Original entry on oeis.org

0, 0, 1, 0, 4, 0, 4, 2, 8, 0, 12, 0, 11, 7, 11, 0, 21, 0, 19, 10, 19, 0, 28, 4, 23, 10, 26, 0, 44, 0, 26, 16, 32, 11, 47, 0, 35, 19, 43, 0, 61, 0, 42, 28, 42, 0, 63, 6, 56, 24, 50, 0, 72, 16, 58, 28, 54, 0, 94, 0, 57, 37, 57, 18, 98, 0, 67, 33, 91, 0, 99, 0, 71, 50, 74, 17, 113, 0, 92
Offset: 2

Views

Author

Alonso del Arte, Feb 16 2014

Keywords

Examples

			a(4) = 1 because 3! = 6 = 2 * 3, which has one prime factor (2) in common with 4.
a(5) = 0 because gcd(4!, 5) = 1.
a(6) = 4 because 5! = 120 = 2^3 * 3 * 5, which has four factors (2 thrice and 3 once) in common with 6.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(add(`if`(i[1] in factorset(n), i[2], 0),
            i=ifactors(j)[2]), j=1..n-1):
    seq(a(n), n=2..100);  # Alois P. Heinz, Mar 17 2014
  • Mathematica
    cmpf[n_]:=Count[Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[ (n-1)!]], ?( MemberQ[Transpose[FactorInteger[n]][[1]],#]&)]; Array[cmpf,80] (* _Harvey P. Dale, Jan 23 2016 *)
  • PARI
    a(n) = {nm = (n-1)!; fn = factor(n); sum (i=1, #fn~, valuation(nm, fn[i,1]));} \\ Michel Marcus, Mar 15 2014
  • Sage
    m=100 # change n for more terms
    [sum(valuation(factorial(n-1),p) for p in prime_divisors(n) if p in prime_divisors(factorial(n-1))) for n in [2..m]] # Tom Edgar, Mar 14 2014
    

Formula

a(p) = 0 for p prime.
a(2n) > a(2n + 1) for all n > 2.
Showing 1-3 of 3 results.