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

A092969 a(1) = 2; for n>1, a(n) = largest prime of the form n!/k + 1, where k < n, or 0 if no such prime exists.

Original entry on oeis.org

2, 3, 7, 13, 61, 241, 2521, 20161, 72577, 604801, 39916801, 59875201, 3113510401, 17435658241, 186810624001, 10461394944001, 118562476032001, 0, 24329020081766401, 304112751022080001, 12772735542927360001
Offset: 1

Views

Author

Amarnath Murthy, Mar 26 2004

Keywords

Comments

Conjecture: There are only finitely many zeros in this sequence. In other words the sequence is identical to A092965 barring a finite set of terms which are zero.
I found zeros for n: 18,51,53,84,95,100,104,106,143,178,180,181,188,202,203,(204). - Robert G. Wilson v, Mar 27 2004

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[n!/k + 1], k++ ]; If[k < n, n!/k + 1, 0]]; Table[ f[n], {n, 22}] (* Robert G. Wilson v, Mar 27 2004 *)
  • PARI
    a(n)=for (i=1,n,if(isprime(n!/i+1),return((n!/i+1))))

Extensions

More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004

A089136 Primes in the progression (n! + m)/m where n advances by 1 and m resets to 1 upon each prime occurrence.

Original entry on oeis.org

2, 3, 7, 13, 61, 241, 2521, 20161, 72577, 604801, 39916801, 59875201, 3113510401, 17435658241, 186810624001, 10461394944001, 118562476032001, 246245142528001, 24329020081766401, 304112751022080001
Offset: 1

Views

Author

Cino Hilliard, Dec 05 2003

Keywords

Comments

From Martin Fuller, Apr 26 2007: (Start)
Both this sequence and A092965 involve the largest prime of the form (n!/m)+1 but they differ in the allowed values of m. The present sequence allows any integer m dividing n!. But A092965 requires m to be the product of distinct numbers up to n.
I believe that the sequences differ at n=104 and n=106: a(104)=(104!/121)+1, A092965(104)=(104!/266)+1, a(106)=(106!/121)+1, A092965(106)=(106!/133)+1. (End)

Examples

			n=7,m=1, (7!+ 1)/1 = 5041 not prime, m advances to 2, (7!+2)/2 = 2521 prime keep it. n advances to 8 and m resets to 1. (8!+ 1)/1 = 61*661 not prime. m advances to 2. (8!+2)/2 = 20161 prime keep it n advances to 9 etc
		

Crossrefs

Different from A092965 (see Comments).

Programs

  • Mathematica
    k = m = 1; Reap[Do[If[PrimeQ[#], k++; m = 1; Sow[#], m++] &[(k! + m)/m], {n, 100}]][[-1, 1]] (* Michael De Vlieger, Apr 16 2024 *)
  • PARI
    nfactp2d2(n,m) = { for(x=1,n, for(k=1,m, y=floor((x!+ k)/k); if(isprime(y),print1(y",");break) ) ) }
    
  • PARI
    lista(nn) = my(list = List()); for(x=1, nn, my(k=1, y); while (!isprime(y=floor((x!+ k)/k)), k++); listput(list, y)); Vec(list); \\ Michel Marcus, Apr 16 2024

A092967 Largest prime of the form a squarefree number + 1 where the prime divisors of the squarefree number are < n.

Original entry on oeis.org

2, 3, 7, 7, 31, 31, 211, 211, 211, 211, 2311, 2311, 6007, 6007, 6007, 6007, 102103, 102103, 3233231, 3233231, 3233231, 3233231, 17160991
Offset: 1

Views

Author

Amarnath Murthy, Mar 26 2004

Keywords

Comments

Conjecture: a(n)-1 has prime(n)-1 divisors. Subsidiary sequence: Number of primes of the form 2*p*q*r*...+1 where p, q, r, etc. are distinct odd primes < n.

Examples

			a(13) = 6007 = 2*3*7*11*13 + 1, as 2*5*7*11*13 + 1, etc. are composite.
		

Crossrefs

Programs

  • Mathematica
    <Ryan Propper, Aug 13 2005 *)

Extensions

More terms from Ryan Propper, Aug 13 2005

A371924 a(n) is the least b such that prime(n)-1 divides b!.

Original entry on oeis.org

1, 2, 4, 3, 5, 4, 6, 6, 11, 7, 5, 6, 5, 7, 23, 13, 29, 5, 11, 7, 6, 13, 41, 11, 8, 10, 17, 53, 9, 7, 7, 13, 17, 23, 37, 10, 13, 9, 83, 43, 89, 6, 19, 8, 14, 11, 7, 37, 113, 19, 29, 17, 6, 15, 10, 131, 67, 9, 23, 7, 47, 73, 17, 31, 13, 79, 11, 7, 173, 29, 11
Offset: 1

Views

Author

Samuel Harkness, Apr 12 2024

Keywords

Comments

This list is connected to Pollard's p-1 algorithm, using the version of the algorithm iterating over all positive integers. Say a large number m has two distinct prime factors q and r, and using Pollard's p-1 algorithm someone wishes to obtain the prime factors. Say q = 223 and r = 307. As prime(48) = 223 and a(48) = 37, given a random "a" coprime to m the factor 223 will be discovered in 37 steps. Also, as prime(63) = 307 and a(63) = 17, given a random "a" coprime to m the factor 307 will be discovered in 17 steps. Note that after 37 steps both factors will be discovered, so the algorithm will return m, failing to discover either prime factor. Therefore, when 17 <= b < 37 the prime factor 307 will be discovered. Note that on rare occasions, for a given "a" value, by chance p divides (a^b! - 1), so it is possible that for some "a" values the actual b value will be less. But, for any "a" value and prime p = prime(n), it is guaranteed that b <= a(n).

Examples

			For n = 25, prime(25) = 97, so we will use p = 97. Then the prime factorization of p - 1  is p - 1 = 2^5 * 3. Note that for p - 1 to divide b!, the exponents for all prime factors in b! must be greater than or equal to the exponents for all prime factors in the prime factorization of p - 1. We find that 8! = 2^7 * 3^2 * 5 * 7 is the least b such that this is true, so a(25) = 8.
		

Crossrefs

Programs

  • Mathematica
    a371924[p_] :=
     Module[{a, d, f, u, v}, f = FactorInteger[p - 1]; d = {};
      For[a = 1, a <= Length[f], a++,
       u = f[[a]];
       v = u[[1]]^u[[2]];
       i = 1;
       While[! Divisible[(u[[1]]*i)!, v], i++]; AppendTo[d, u[[1]]*i]];
      Return[Max[d]]]
    list = {};
    For[p = 1, p <= 71, p++,
     AppendTo[list, {p, a371924[Prime[p]]}]]
    Print[list]
  • PARI
    a(n) = my(b=1, q=prime(n)-1); while (b! % q, b++); b; \\ Michel Marcus, Apr 15 2024
    
  • Python
    from sympy import prime
    def A371924(n):
        m = prime(n)-1
        b, k = 1, 1%m
        while k:
            b += 1
            k = k*b%m
        return b # Chai Wah Wu, Apr 25 2024

A206762 a(n) is the least number from 1,2,...,n-1, such that n!/a(n)+1 is prime, and a(n)=0, if such number does not exist.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 2, 5, 6, 1, 8, 2, 5, 7, 2, 3, 0, 5, 8, 4, 16, 3, 8, 4, 10, 1, 13, 8, 2, 19, 4, 11, 11, 7, 3, 1, 12, 13, 4, 1, 24, 2, 8, 5, 9, 25, 16, 2, 12, 0, 26, 0, 17, 22, 44, 22, 37, 7, 48, 4, 37, 18, 7, 39, 16, 19, 7, 15, 19, 36, 30, 1, 14, 15, 16, 1
Offset: 2

Views

Author

Vladimir Shevelev, Feb 12 2012

Keywords

Comments

The sequence of primes n!/a(n)+1, when a(n)>0, is increasing.

Crossrefs

Programs

  • Mathematica
    Table[s = Select[Range[n - 1], PrimeQ[n!/# + 1] &, 1]; If[s == {}, 0, s[[1]]], {n, 2, 100}] (* T. D. Noe, Feb 13 2012 *)
Showing 1-5 of 5 results.