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-9 of 9 results.

A053710 Prime-balanced factorials: factorials k! that are the mean of their 2 closest neighboring primes.

Original entry on oeis.org

6, 120, 3628800, 51090942171709440000
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

Values of k are in A053709.
The next two terms are 171! and 190!. - Jud McCranie, Jul 04 2000

Examples

			For k = 21, k! = 51090942171709440000, d = 31, and the closest primes to 21! are q = 21! - 31 = 51090942171709439969, p = 21! + 31 = 51090942171709440031.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[25]!,NextPrime[#]-#==#-NextPrime[#,-1]&] (* Harvey P. Dale, May 08 2025 *)

Formula

k! = (p+q)/2; p = k! + d, q = k! - d, where p and q are the closest primes to k!.
a(n) = A053709(n)!.

Extensions

a(3) corrected by Sean A. Irvine, Jan 14 2022

A075409 a(n) is the smallest m such that n!-m and n!+m are both primes.

Original entry on oeis.org

0, 1, 5, 7, 19, 19, 31, 17, 11, 17, 83, 67, 353, 227, 163, 59, 61, 113, 353, 31, 1447, 571, 389, 191, 337, 883, 101, 1823, 659, 709, 163, 1361, 439, 307, 1093, 1733, 2491, 1063, 1091, 1999, 1439, 109, 2753, 607, 2617, 269, 103, 2663, 337, 14447, 2221, 5471, 2887
Offset: 2

Views

Author

Zak Seidov, Sep 18 2002

Keywords

Comments

For n=3,5,10,21,171,190,348, n! is an interprime, the average of two consecutive primes, see A053709. In general n! may be average of several pairs of primes, in which case the minimal distance is in the sequence. See also n^n and n!! as average of two primes in A075468 and A075410.
According to Goldbach's conjecture, a(n) always exists with a(n) = A047160(n!). - Jens Kruse Andersen, Jul 30 2014

Examples

			a(4)=5 because 4!=24 and 19 and 25 are primes with smallest distance 5 from 4!.
		

Crossrefs

Programs

  • Mathematica
    smp[n_]:=Module[{m=1,nf=n!},While[!PrimeQ[nf+m]||!PrimeQ[nf-m],m=m+2];m]; Join[{0},Array[smp,60,3]] (* Harvey P. Dale, Apr 18 2014 *)
  • PARI
    a(n) = {my (m=0); until (ok, ok = isprime(n!-m) && isprime(n!+m); if (!ok, m++);); return (m);} \\ Michel Marcus, Apr 19 2013

Extensions

More terms from David Wasserman, Jan 17 2005

A053711 Numbers d such that, for some k, the upper and lower primes closest to k! are k! + d and k! - d.

Original entry on oeis.org

1, 7, 11, 31, 397, 409, 1657, 2131, 7607
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

This sequence lists d = nextprime(k!) - k! = prevprime(k!) - k! for k in A053709.

Examples

			For k = 10, k! = 3628800, d = 11, and the closest primes to 10! are q = 10! - 11 = 3628789 and p = 10! + 11 = 3628811. The differences d are listed here.
		

Crossrefs

Programs

  • Mathematica
    Reap[Do[If[SameQ @@ #, Sow@ First[#]] &@ Abs[# - NextPrime[#, {-1, 1}]] &[i!], {i, 200}]][[-1, -1]] (* Michael De Vlieger, Jan 14 2022 *)

Extensions

a(5)-a(8) from Donovan Johnson, Oct 12 2008
a(9) from Hans Havermann, Aug 15 2014

A053714 Smallest (in magnitude) nonzero number m such that n!+m is prime.

Original entry on oeis.org

1, 1, 1, -1, 7, -1, -1, 23, -13, 11, 1, -1, -23, -1, 43, 23, 31, 37, 89, 29, 31, 31, -89, -73, 41, -37, 1, 67, -31, -1, -61, -1, -1, 97, 61, -127, 1, -1, -73, 53, 1, -79, 71, 47, -53, -89, -79, 53, -59, 61, -179, 53, -59, -127, -61, 149, 107, -109, -137, -139, -71, -71, -101, 67, -127, 283, 73, 83, -103, -97, -751, 101
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

a(n) is the defined, nonzero (thus excluding a(1) and a(2) of A033933) minimum of A033932(n) and A033933(n) multiplied by -1 if that minimum is not A033932(n). If n!+m and n!-m are equidistant primes (A053709), we have (arbitrarily) chosen positive m.

Examples

			For n=4, the possible m are -1 (24-1) and +5 (24+5). The former is closer to 4! so a(4) is -1.
For n=5, the possible m are -7 (120-7) and +7 (120+7). Being equidistant to 5!, a(5) is +7.
		

Crossrefs

Cf. A006990, A037151, A033932, A033933, A053709, A056752 (unsigned version with a different second term).

Extensions

Edited by Hans Havermann, Jul 23 2014

A075275 Numbers k such that k!! is an interprime, i.e., the average of two successive primes.

Original entry on oeis.org

5, 7, 10, 11, 22, 41, 67, 76, 91, 96, 163, 245, 299, 341, 434, 510, 535, 800, 935, 1401, 1403, 1747
Offset: 1

Views

Author

Zak Seidov, Sep 12 2002

Keywords

Comments

The parity of k is opposite to the parity of the differences.
a(23) > 3000. - Michael S. Branicky, Jan 20 2025

Examples

			5 is a term because 5!! = 15 is the average of two successive primes, 13 and 17;
163 is a term because 163!! is the average of two successive primes, 163!! -+ 128.
		

Crossrefs

Cf. A053709. The differences between k!! and its neighboring primes are in A075453.

Programs

  • Mathematica
    PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k] Do[ a = n!!; If[ 2a == PrevPrim[a] + NextPrim[a], Print[n]], {n, 3, 762}]

Extensions

Edited, corrected and extended by Robert G. Wilson v, Sep 16 2002
a(18)-a(22) from Michael S. Branicky, Jan 19 2025

A053712 Lower balancing primes to prime-balanced factorials.

Original entry on oeis.org

5, 113, 3628789, 51090942171709439969
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

The next two terms are 171!-397 and 190!-409. - Jud McCranie, Jul 04 2000

Examples

			113 is balancing 5! = 120 from below, where 5! = 120 is a balanced factorial.
		

Crossrefs

Formula

a(n) = A053709(n)! - A053711(n) = A053710(n) - A053711(n). - Amiram Eldar, Mar 10 2025

A053713 Upper balancing primes to prime-balanced factorials.

Original entry on oeis.org

7, 127, 3628811, 51090942171709440031
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

The next two terms are 171!+397 and 190!+409, which are too large to include. - Jud McCranie, Jul 04 2000

Examples

			127 is balancing 5! = 120 from above, where 5! = 120 is a balanced factorial.
		

Crossrefs

Formula

a(n) = A053709(n)! + A053711(n) = A053710(n) + A053711(n). - Amiram Eldar, Mar 10 2025

A074165 Numbers n such that n!!! is an interprime.

Original entry on oeis.org

4, 6, 13, 15, 16, 23, 28, 46, 126, 148, 285
Offset: 1

Views

Author

Robert G. Wilson v, Sep 16 2002

Keywords

Comments

No additional terms up to n = 700. - Harvey P. Dale, Aug 02 2018

Crossrefs

Programs

  • Mathematica
    PrevPrim[n_] := Block[{k = n - 1}, While[ ! PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; NFactorialM[n_, m_] := Block[{k = n, p = n}, While[k > m, k -= m; p = p*k]; p]; Do[ a = NFactorialM[n, 3]; If[2a == PrevPrim[a] + NextPrim[a], Print[n]], {n, 3, 500}]
    npipQ[n_]:=Module[{p=Times@@Range[n,1,-3]},p==Mean[{NextPrime[ p], NextPrime[ p,-1]}]]; Select[Range[300],npipQ] (* Harvey P. Dale, Aug 02 2018 *)

A350782 a(n) is the number of pairs of primes (p,q), p < q, such that (p + q)/2 = n!.

Original entry on oeis.org

1, 5, 18, 60, 315, 1615, 9928, 70437, 637504, 5829386, 64647125, 722750400
Offset: 3

Views

Author

Jon E. Schoenfield, Jan 15 2022

Keywords

Comments

a(n) is the number of pairs of primes that are equidistant from n!.
Equivalently, a(n) is the number of positive integers d such that n! - d and n! + d are primes. For the smallest such d, iff there are no primes in the open interval (n! - d, n! + d), then n is a term in A053709, n! is a term in A053710, and d is a term in A053711.

Examples

			For n = 4, n! = 24, from which 5 pairs of primes are equidistant; in order of increasing distance, these are (19, 29), (17, 31), (11, 37), (7, 41), and (5, 43), so a(4) = 5. (A prime (23) lies between 19 and 29, so n=4 is not a term of A053709.)
For n = 5, n! = 120, from which 18 pairs of primes are equidistant: (113, 127), (109, 131), (103, 137), (101, 139), (89, 151), (83, 157), (73, 167), (67, 173), (61, 179), (59, 181), (47, 193), (43, 197), (41, 199), (29, 211), (17, 223), (13, 227), (11, 229), and (7, 233), so a(5) = 18. (The pair least distant from 120 is (113, 127), and there are no primes between 113 and 127, so n = 5 is a term of A053709, n! = 120 is a term of A053710, and d = 120 - 113 = 127 - 120 = 7 is a term of A053711.)
		

Crossrefs

Programs

  • Mathematica
    Table[Length@IntegerPartitions[2n!,2,Prime@Range@PrimePi[2n!]],{n,3,9}] (* Giorgos Kalogeropoulos, Jan 16 2022 *)
  • Python
    from sympy import isprime, nextprime, factorial
    def A350782(n):
        m, p, c = factorial(n), 3, 0
        while p <= m:
            if isprime(2*m-p):
                c += 1
            p = nextprime(p)
        return c # Chai Wah Wu, Jan 16 2022

Formula

a(n) = A002375(n!).

Extensions

a(14) from Martin Ehrenstein, Jan 25 2022
Showing 1-9 of 9 results.