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.

Previous Showing 11-18 of 18 results.

A297707 a(n) = Product_{k=1..n-1} n!k, where n!k is k-tuple factorial of n.

Original entry on oeis.org

1, 2, 18, 768, 90000, 44789760, 30494620800, 121762322841600, 393644011735296000, 5618427494400000000000, 107587910030480590233600000, 5951222311476064581656248320000, 176804782652901880753915871232000000, 69819090744423637487544223697731584000000
Offset: 1

Views

Author

Lechoslaw Ratajczak, Jan 03 2018

Keywords

Comments

What is the least n > 2 for which a(n) - prevprime(a(n)) is a composite number? If such a number n exists, it is greater than 250.
The least n for which nextprime(a(n)) - a(n) is a composite number is 158.

Examples

			a(2) = (2!1) = (2*1) = 2;
a(3) = (3!1)*(3!2) = (3*2*1)*(3*1) = 18;
a(4) = (4!1)*(4!2)*(4!3) = (4*3*2*1)*(4*2)*(4*1) = 768;
a(5) = (5!1)*(5!2)*(5!3)*(5!4) = (5*4*3*2*1)*(5*3*1)*(5*2)*(5*1) = 90000.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<1, 1, n*b(n-k, k)) end:
    a:= n-> mul(b(n, k), k=1..n-1):
    seq(a(n), n=1..20);  # Alois P. Heinz, Dec 02 2018
  • Mathematica
    Array[(#^(# - 1)) Product[k^DivisorSigma[0, # - k], {k, # - 1}] &, 13] (* Michael De Vlieger, Jan 04 2018 *)
  • PARI
    a(n) = (n^(n-1))*prod(k=1, n-1, k^numdiv(n-k)); \\ Michel Marcus, Dec 02 2018

Formula

a(n) = Product_{t=1..n-1} (Product_{k=0..floor((n-1)/t)} (n-t*k)).
a(n) = (n^(n-1))*Product_{k=1..n-1} k^tau(n-k).

A340013 The prime gap, divided by two, which surrounds n!.

Original entry on oeis.org

1, 3, 7, 4, 6, 27, 15, 11, 7, 15, 45, 10, 45, 38, 45, 39, 95, 30, 31, 52, 93, 102, 95, 48, 22, 84, 127, 54, 94, 40, 19, 145, 87, 129, 49, 22, 85, 68, 66, 88, 90, 78, 146, 95, 156, 78, 71, 79, 225, 60, 65, 175, 66, 305, 192, 196, 215, 205, 420, 101, 186, 213, 160
Offset: 3

Views

Author

Robert G. Wilson v, Jan 09 2021

Keywords

Comments

A theorem states that between (n+1)! + 2 and (n+1)! + (n+1) inclusive, there are n consecutive composite integers, namely 2, 3, 4, ..., n, n+1.
Records: 1, 3, 7, 27, 45, 95, 102, 127, 145, 146, 156, 225, 305, 420, 804, 844, 1173, 1671, 1725, 1827, 2570, 2930, 3318, 5142, 5946, 6837, 7007, 8208, 10221, ..., .

Examples

			For a(1), there are no positive primes which surround 1!. Therefore a(1) is undefined.
For a(2), there are two contiguous primes {2, 3} with 2 being 2!. The prime gap is 1. However, the two primes do not surround 2!, so a(2) is undefined.
For a(3), the following set of numbers, {5, 6, 7}, with 3! being in the middle. The prime gap is 2; therefore, a(3) = 1.
For a(4), the following set of numbers, {23, 24, 25, 26, 27, 28, 29} with 4! in between the two primes 23 & 29. The prime gap is 6, so a(4) = 3.
		

Crossrefs

Programs

  • Maple
    a:= n-> (f-> (nextprime(f-1)-prevprime(f+1))/2)(n!):
    seq(a(n), n=3..70);  # Alois P. Heinz, Jan 09 2021
  • Mathematica
    a[n_] := (NextPrime[n!, 1] - NextPrime[n!, -1])/2; Array[a, 70, 3]
  • PARI
    a(n) = (nextprime(n!+1) - precprime(n!-1))/2; \\ Michel Marcus, Jan 11 2021
    
  • Python
    from sympy import factorial, nextprime, prevprime
    def A340013(n):
        f = factorial(n)
        return (nextprime(f)-prevprime(f))//2 # Chai Wah Wu, Jan 23 2021

Formula

a(n) = (A037151(n) - A006990(n))/2 = (A033932(n) + A033933(n))/2.
a(n) = A054588(n)/2 = A058054(n)/2. - Alois P. Heinz, Jan 09 2021

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

A063959 Sum of the primes from 1 to n!.

Original entry on oeis.org

0, 0, 2, 10, 100, 1593, 41741, 1578242, 80294846, 5356015580, 451223209946, 46900682786541, 5891009442510166, 879657744587755114, 153967535281046615774, 31216213430872403460411, 7256556722488434503836458, 1917031284234466887065107947, 571083301099266868435687532291
Offset: 0

Views

Author

Jason Earls, Sep 03 2001

Keywords

Comments

Sum of prime factors (without repetition) of (n!)!.

Examples

			a(4) = sum of primes <= 24. They are 2, 3, 5, 7, 11, 13, 17, 19 and 23. This sum is 100.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := (k = n + 1; While[ ! PrimeQ[k], k++ ]; k); s = 0; p = 1; Do[ Do[p = NextPrim[p]; s = s + p, {i, PrimePi[(n - 1)! ] + 1, PrimePi[(n)! ]}]; Print[s], {n, 1, 12} ]
    Do[ Print[ Sum[ Prime[k], {k, 1, PrimePi[n! ]}]], {n, 0, 10} ]
    Table[Total[Prime[Range[PrimePi[n!]]]],{n,0,9}] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Aug 17 2025 *)
  • PARI
    sumprime(n,s,fac,i)=fac=factor(n); for(i=1,matsize(fac)[1],s=s+fac[i,1]); return(s); for(n=0,22,print(sumprime(n!!)))

Formula

a(n) = A034387(A000142(n)). - Michel Marcus, Jun 14 2024

Extensions

Better description and more terms from Robert G. Wilson v, Oct 04 2001
a(13)-a(15) from Donovan Johnson, May 03 2010
a(16)-a(18) from Daniel Suteu, Nov 15 2018

A053708 Nearest prime to n! (but not equal to n!).

Original entry on oeis.org

2, 3, 5, 23, 113, 719, 5039, 40343, 362867, 3628789, 39916801, 479001599, 6227020777, 87178291199, 1307674368043, 20922789888023, 355687428096031, 6402373705728037, 121645100408832089, 2432902008176640029, 51090942171709439969, 1124000727777607680031, 25852016738884976639911
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

If n! is the average of its closest prime neighbors then the smaller prime is to be chosen (as in A051701).

Examples

			For 8! = 40320 the closest upper and lower primes are 40289 and 40343 with d = 31 and d = 23, so 40343 is closer to 8! than the lower neighbor.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Module[{nf=n!,s,l},s=NextPrime[nf,-1];l=NextPrime[nf];If[nf-s>l-nf,l,s]]
    Table[f[i],{i,25}] (* Harvey P. Dale, Dec 08 2010 *)

Extensions

Corrected by Rick L. Shepherd, Jan 11 2006
a(21)-a(23) from Amiram Eldar, Mar 10 2025

A178606 Smallest prime > n!! (double factorial of n).

Original entry on oeis.org

2, 3, 5, 11, 17, 53, 107, 389, 947, 3847, 10399, 46091, 135151, 645131, 2027033, 10321937, 34459429, 185794579, 654729139, 3715891217, 13749310577, 81749606417, 316234143227, 1961990553613, 7905853580633, 51011754393671
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    PrimeNext[n_]:=Module[{k},k=n+1;While[ !PrimeQ[k],k++ ];k]; Table[PrimeNext[n!! ],{n,40}]

A178607 Largest prime < n!! (double factorial of n).

Original entry on oeis.org

2, 7, 13, 47, 103, 383, 941, 3833, 10391, 46073, 135131, 645097, 2027023, 10321919, 34459423, 185794463, 654729073, 3715891181, 13749310511, 81749606383, 316234143163, 1961990553581, 7905853580621, 51011754393599
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k]; Table[PrimePrev[n!! ],{n,3,40}]
    NextPrime[#,-1]&/@(Range[3,30]!!) (* Harvey P. Dale, Jul 13 2015 *)
  • PARI
    a(n)=if(n<2, 1, n*a(n-2)); for(n=3,26,print1(precprime(a(n)-1)", ")); \\ Graziano Aglietti (mg5055(AT)mclink.it), Aug 23 2010

Formula

a(n) = A151799(A006882(n)). - R. J. Mathar, Jun 23 2010

Extensions

Offset corrected by R. J. Mathar, Jun 23 2010
Previous Showing 11-18 of 18 results.