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-7 of 7 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

A135683 Duplicate of A005451.

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, 1, 62, 63
Offset: 1

Views

Author

Mohammad K. Azarian, Dec 01 2007

Keywords

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.

Programs

  • Magma
    [IsPrime(n) select 1 else n: n in [1..70]]; // Vincenzo Librandi, Feb 22 2013
    
  • 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 *)
  • 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

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

A181569 Greatest common divisor of n! and n+1.

Original entry on oeis.org

1, 1, 2, 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, 1, 62, 63, 64, 65, 66, 1, 68, 69, 70, 1, 72, 1, 74, 75, 76, 77, 78, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 31 2010

Keywords

Comments

From Wilson's theorem, it follows that a(n) = 1 when n + 1 is prime, a(n) > 1 otherwise. - Alonso del Arte, Feb 25 2014

Examples

			a(6) = 1 because 6! and 7 are coprime.
a(7) = 8 because 7! = 5040 and gcd(5040, 8) = 8.
a(8) = 9 because 8! = 40320 and gcd(40320, 9) = 9.
		

Crossrefs

Programs

Formula

a(n) = A050873(A000142(n), n + 1);
a(A006093(n)) = 1;
for n > 3: a(n) = (n + 1) / (n*A010051(n+1) + 1).
a(n) = (n+1)/A014973(n+1). - Michel Marcus, Aug 14 2015

A088440 a(4n) = 4n, otherwise a(n) = 1.

Original entry on oeis.org

0, 1, 1, 1, 4, 1, 1, 1, 8, 1, 1, 1, 12, 1, 1, 1, 16, 1, 1, 1, 20, 1, 1, 1, 24, 1, 1, 1, 28, 1, 1, 1, 32, 1, 1, 1, 36, 1, 1, 1, 40, 1, 1, 1, 44, 1, 1, 1, 48, 1, 1, 1, 52, 1, 1, 1, 56, 1, 1, 1, 60, 1, 1, 1, 64, 1, 1, 1, 68, 1, 1, 1, 72, 1, 1, 1, 76, 1, 1, 1, 80, 1, 1, 1, 84, 1, 1, 1, 88, 1, 1, 1, 92, 1, 1, 1
Offset: 0

Views

Author

Roger L. Bagula, Nov 09 2003

Keywords

Crossrefs

Cf. A088140.

Programs

Formula

a(n) = 1+(n-1)*((1+(-1)^(n/2))*(1+(-1)^n))/4. - Wesley Ivan Hurt, May 07 2021
G.f.: x*(1 + x + x^2 + 4*x^3 - x^4 - x^5 - x^6)/(1-x^4)^2. - Georg Fischer, Nov 17 2022
E.g.f.: (1/2)*( cosh(x) + (x+2)*sinh(x) - cos(x) - x*sin(x) ). - G. C. Greubel, Dec 05 2022

Extensions

Description corrected by Antti Karttunen, Jul 03 2018

A088441 a(n) = n if n == 0 (mod 3), a(n) = 1 if n == 2 (mod 3), otherwise a(n) = floor((n-2)/2).

Original entry on oeis.org

1, 3, 1, 1, 6, 2, 1, 9, 4, 1, 12, 5, 1, 15, 7, 1, 18, 8, 1, 21, 10, 1, 24, 11, 1, 27, 13, 1, 30, 14, 1, 33, 16, 1, 36, 17, 1, 39, 19, 1, 42, 20, 1, 45, 22, 1, 48, 23, 1, 51, 25, 1, 54, 26, 1, 57, 28, 1, 60, 29, 1, 63, 31, 1, 66, 32, 1, 69, 34, 1, 72, 35, 1, 75, 37, 1, 78, 38, 1, 81, 40, 1
Offset: 2

Views

Author

Roger L. Bagula, Nov 09 2003

Keywords

Crossrefs

Programs

  • Magma
    function A088441(n)
      if (n mod 3) eq 0 then return n;
      elif (n mod 3) eq 2 then return 1;
      else return Floor((n-2)/2);
      end if; return A088441;
    end function;
    [A088441(n): n in [2..100]]; // G. C. Greubel, Dec 05 2022
    
  • Mathematica
    p[n_]= n!/Product[i, {i, n -Floor[2*n/3], n -Floor[n/3]}];
    Table[Floor[p[n]/p[n-1]], {n,2,100}]
    (* Second program *)
    a[n_]:= If[Mod[n,3]==0, n, If[Mod[n,3]==2, 1, Floor[(n-2)/2]]];
    Table[a[n], {n,2,100}] (* G. C. Greubel, Dec 05 2022 *)
  • SageMath
    def A088441(n):
        if (n%3)==0: return n
        elif (n%3)==2: return 1
        else: return (n-2)//2
    [A088441(n) for n in range(2,100)] # G. C. Greubel, Dec 05 2022

Formula

a(n) = floor(p(n)/p(n-1)), where p(n) = n!/Product_{j=n-floor(2*n/3)..n-floor(n/3)} j.
From G. C. Greubel, Dec 05 2022: (Start)
a(n) = floor( n*Gamma(n - floor(2*n/3))*Gamma(n - floor((n-1)/3))/(Gamma(n - floor(n/3) + 1)*Gamma(n - floor(2*(n-1)/3) - 1)) ).
a(n) = n if n mod 3 = 0, 1 if n mod 3 = 2, otherwise floor((n-2)/2). (End)

Extensions

Edited by G. C. Greubel, Dec 05 2022

A088494 Let P(n,k) = n!/(Product_{i=1..pi(n)/2^(k-1)} prime(i)) be an integer matrix of "partial" factorials. Then a(n) = sum_{k=1..8} floor( P(n,k)/P(n-1,k)).

Original entry on oeis.org

15, 20, 32, 36, 48, 41, 64, 72, 80, 78, 96, 81, 112, 120, 128, 120, 144, 94, 160, 168, 176, 162, 192, 200, 208, 216, 224, 177, 240, 218, 256, 264, 272, 280, 288, 195, 304, 312, 320, 288, 336, 261, 352, 360, 368, 330, 384, 392, 400, 408, 416, 212, 432, 440, 448
Offset: 2

Views

Author

Roger L. Bagula, Nov 10 2003

Keywords

Comments

The auxiliary integer array P is n! divided by the product of the first primes with an upper limit of the prime index given by A000720(n)/2^(k-1). It starts in row n=1 with columns k>=1 as:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 2, 2, 2, 2, 2, 2, ...
1, 3, 6, 6, 6, 6, 6, 6, ...
4, 12, 24, 24, 24, 24, 24, 24, ...
4, 60, 120, 120, 120, 120, 120, 120, ...
24, 360, 720, 720, 720, 720, 720, 720, ...
24, 840, 2520, 5040, 5040, 5040, 5040, 5040, ...
The a(n) are some sort of average integer value of ratios of neighbored rows in the first 8 columns.

Crossrefs

Programs

  • Maple
    P := proc(n,k)
        local a,i ;
        a := 1 ;
        for i from 1 to numtheory[pi](n)/2^(k-1) do
            a := ithprime(i) *a ;
        end do:
        n!/a ;
    end proc:
    A088494 := proc(n)
        add( floor(P(n,k)/P(n-1,k)),k=1..8) ;
    end proc: # R. J. Mathar, Sep 17 2013
  • Mathematica
    p[n_, k_]:= p[n,k]= n!/Product[Prime[i], {i, PrimePi[n]/2^(k-1)}];
    f[n_]:= f[n]= Sum[Floor[p[n, k]/p[n-1, k]], {k,8}];
    Table[f[n], {n,2,70}]
  • Sage
    @CachedFunction
    def f(n,k): return product( nth_prime(j) for j in (1..prime_pi(n)/2^(k-1)) )
    def A088494(n): return sum( (n*f(n-1,k)//f(n,k)) for k in (1..8) )
    [A088494(n) for n in (2..70)] # G. C. Greubel, Mar 27 2022

Formula

a(n) = Sum_{k=1..8} floor(p(n,k)/p(n-1,k)), where p(n, k) = n!/( Product_{j=1..PrimePi(n)/2^(k-1)} Prime(j) ). - G. C. Greubel, Mar 27 2022

Extensions

Meaningful name by R. J. Mathar, Sep 17 2013

A088438 A chaotic Cantor integer type product set of the factorial function that trifurcates.

Original entry on oeis.org

2, 6, 4, 7, 24, 35, 8, 18, 70, 88, 12, 29, 140, 165, 16, 40, 234, 266, 20, 52, 352, 391, 24, 64, 494, 540, 28, 76, 660, 713, 32, 88, 850, 910, 36, 99, 1064, 1131, 40, 111, 1302, 1376, 44, 123, 1564, 1645, 48, 135, 1850, 1938, 52, 147, 2160, 2255, 56, 159, 2494
Offset: 0

Views

Author

Roger L. Bagula, Nov 09 2003

Keywords

Comments

This result is due to analysis of the prime product, composite product and factorial type function to a more general type of function: n!=Product[Set1[i],{i, limit1, limit2}]*Product[Set2[i],{i,limit3,limit4}] In this case the second product contains two intervals instead of one.

Crossrefs

Cf. A088140.

Programs

  • Mathematica
    (* factorial based function with half interval Cantor hole in the middle*) p[n_]=n!/Product[i, {i, n-Floor[n/4], n-Floor[3*n/4]}] digits=200 a0=Table[Floor[p[n]/p[n-1]], {n, 2, digits}]

Formula

P[n]=n!/Product[i, {i, n-Floor[n/4], n-Floor[3*n/4]}] a(n) = Floor[P[n]/P[n-1]]
Showing 1-7 of 7 results.