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.

A088140 Duplicate of A005451 (for n >= 3).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Nov 04 2003

Keywords

Comments

Previous name was: a(n) = 1 if n is an odd prime otherwise a(n) = n.

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

A007619 Wilson quotients: ((p-1)! + 1)/p where p is the n-th prime.

Original entry on oeis.org

1, 1, 5, 103, 329891, 36846277, 1230752346353, 336967037143579, 48869596859895986087, 10513391193507374500051862069, 8556543864909388988268015483871, 10053873697024357228864849950022572972973, 19900372762143847179161250477954046201756097561, 32674560877973951128910293168477013254334511627907
Offset: 1

Views

Author

Keywords

Comments

Suggested by the Wilson-Lagrange Theorem: An integer p > 1 is a prime if and only if (p-1)! == -1 (mod p).
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; sequence gives b(primes).
Subsequence of the generalized Wilson quotients A157249. - Jonathan Sondow, Mar 04 2016
a(n) is an integer because of to Wilson's theorem (Theorem 80, p. 68, the if part of Theorem 81, p. 69, given in Hardy and Wright). See the first comment. `This theorem is of course quite useless as a practical test for the primality of a given number n' ( op. cit., p. 69). - Wolfdieter Lang, Oct 26 2017

Examples

			The 4th prime is 7, so a(4) = (6! + 1)/7 = 103.
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 29.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, fifth edition, Oxford Science Publications, Clarendon Press, Oxford, 2003.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 277.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 234.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005450, A005451, A007540 (Wilson primes), A050299, A163212, A225672, A225906.
Cf. A261779.
Cf. A157249, A157250, A292691 (twin prime analog quotient).

Programs

Formula

a(n) = A157249(prime(n)). - Jonathan Sondow, Mar 04 2016

Extensions

Definition clarified by Jonathan Sondow, Aug 05 2011

A005450 Numerator of (1 + Gamma(n))/n.

Original entry on oeis.org

2, 1, 1, 7, 5, 121, 103, 5041, 40321, 362881, 329891, 39916801, 36846277, 6227020801, 87178291201, 1307674368001, 1230752346353, 355687428096001, 336967037143579, 121645100408832001, 2432902008176640001
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A005451 (denominators).

Programs

  • Magma
    [Numerator((1 + Factorial(n-1))/n): n in [1..30]]; // G. C. Greubel, Nov 21 2022
    
  • Mathematica
    Table[Numerator[(1 + Gamma[n])/n], {n, 50}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Sep 12 2006 *)
  • SageMath
    [numerator((1+gamma(n))/n) for n in range(1,31)] # G. C. Greubel, Nov 21 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) = numerator(b(n)), since b(n)=(1+Gamma(n))/n. - Joseph Biberstine (jrbibers(AT)indiana.edu), Sep 12 2006

Extensions

Better description from Joseph Biberstine (jrbibers(AT)indiana.edu), Sep 12 2006

A364813 a(n) = Product_{k=2..n} k^ord(n, k) where ord(n, k) = 0 if k does not divide n, otherwise ord(n, k) = e where e is such that k^e divides n but k^(e + 1) does not.

Original entry on oeis.org

1, 2, 3, 16, 5, 36, 7, 256, 81, 100, 11, 3456, 13, 196, 225, 32768, 17, 17496, 19, 16000, 441, 484, 23, 1327104, 625, 676, 6561, 43904, 29, 810000, 31, 2097152, 1089, 1156, 1225, 362797056, 37, 1444, 1521, 10240000, 41, 3111696, 43, 170368, 273375, 2116, 47, 8153726976, 2401, 625000
Offset: 1

Views

Author

Michel Marcus, Oct 21 2023

Keywords

Comments

a(n) is divisible by n and a(p) = p if p is prime. More general, if the base of the factors of the product is restricted to prime numbers then the positive integers are generated according to the fundamental theorem of arithmetic. - Peter Luschny, Apr 01 2025

Crossrefs

Cf. A363838 (also uses gamma), A000027, A005451, A381885 (a(n)/n).

Programs

  • Maple
    with(padic): a := n -> local k; mul(k^ordp(n, k), k = 2.. n): seq(a(n), n = 1..50); # Peter Luschny, Apr 01 2025
  • Mathematica
    Table[Product[k^IntegerExponent[n, k], {k, 2, n}], {n, 1, 50}] (* Peter Luschny, Apr 01 2025 *)
  • PARI
    f(n, b) = sum(i=1, logint(n, b), n\b^i);
    d(n,b) = f(n,b)-f(n-1,b);
    a(n) = prod(b=2, n, b^d(n,b));

Formula

a(n) = Product_{b=2..n} b^d(n, b) where d(n, b) = gamma(n, b) - gamma(n-1, b) and gamma(n, b) = Sum_{i>=1} floor(n/b^i).

Extensions

More explicit name from Peter Luschny, Apr 01 2025

A380441 Sum of the nonprimes dividing n and the number of distinct primes dividing n.

Original entry on oeis.org

1, 2, 2, 6, 2, 9, 2, 14, 11, 13, 2, 25, 2, 17, 18, 30, 2, 36, 2, 37, 24, 25, 2, 57, 27, 29, 38, 49, 2, 65, 2, 62, 36, 37, 38, 88, 2, 41, 42, 85, 2, 87, 2, 73, 72, 49, 2, 121, 51, 88, 54, 85, 2, 117, 58, 113, 60, 61, 2, 161, 2, 65, 96, 126, 68, 131, 2, 109, 72, 133, 2, 192, 2, 77, 118, 121, 80, 153, 2, 181, 119, 85, 2, 215, 88, 89, 90, 169, 2, 227, 94, 145, 96
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 21 2025

Keywords

Comments

Inverse Möbius transform of A005451(n).
For each divisor d of n, add 1 if d is prime, else add d.

Crossrefs

Cf. A000203 (sigma), A001221 (omega), A005171 (char nonprimes), A005451, A008472 (sopf), A023890.

Programs

  • Mathematica
    Table[DivisorSigma[1, n] - Sum[p, {p, Select[Divisors[n], PrimeQ]}] + PrimeNu[n], {n, 100}]

Formula

a(n) = sigma(n) - sopf(n) + omega(n).
a(n) = Sum_{d|n} d^c(d), where c = A005171.
a(n) = Sum_{d|n} A005451(d).
a(p^k) = 1 - p + (p^(k+1)-1)/(p-1) for p prime, k >= 1. - Wesley Ivan Hurt, Jul 02 2025
a(n) = A023890(n) + A001221(n). - Wesley Ivan Hurt, Aug 31 2025

A381885 a(n) = Product_{k=2..n-1} k^ord(n, k) where ord(n, k) = 0 if k does not divide n, otherwise is the exponent of the highest power of k that divides n.

Original entry on oeis.org

1, 1, 1, 4, 1, 6, 1, 32, 9, 10, 1, 288, 1, 14, 15, 2048, 1, 972, 1, 800, 21, 22, 1, 55296, 25, 26, 243, 1568, 1, 27000, 1, 65536, 33, 34, 35, 10077696, 1, 38, 39, 256000, 1, 74088, 1, 3872, 6075, 46, 1, 169869312, 49, 12500, 51, 5408, 1, 1417176, 55, 702464, 57
Offset: 1

Views

Author

Peter Luschny, Apr 01 2025

Keywords

Crossrefs

Programs

  • Maple
    with(padic): a := n -> local k; mul(k^ordp(n, k), k = 2.. n-1): seq(a(n), n = 1..57);
  • Mathematica
    Table[Product[k^IntegerExponent[n, k], {k, 2, n - 1}], {n, 1, 57}]
  • PARI
    a(n) = prod(k=2, n-1, k^valuation(n, k)); \\ Michel Marcus, Apr 01 2025

Formula

If the base of the factors of the product is restricted to prime numbers then A005451 is generated.
a(p) = 1 if p is prime.
a(n) = A364813(n) / n.
Showing 1-7 of 7 results.