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

A166862 Primes p that divide n! + 1 for some n other than p-1.

Original entry on oeis.org

2, 7, 11, 19, 23, 29, 43, 47, 59, 61, 67, 71, 79, 83, 103, 109, 127, 131, 137, 139, 149, 163, 179, 191, 193, 199, 227, 233, 239, 251, 257, 263, 269, 271, 277, 293, 307, 311, 317, 347, 359, 367, 379, 383, 389, 397, 401, 419, 431, 443, 449, 461, 463, 467, 479
Offset: 1

Views

Author

Michael B. Porter, Oct 22 2009

Keywords

Comments

For n >= p, p is one of the factors of n!, so p cannot divide n! + 1. As a result, only 0 <= n <= p-2 needs to be searched.
For n = p-1, by Wilson's Theorem, (p-1)! = -1 (mod p), so p divides (p-1)! + 1.
Since by convention 0! = 1, 2 is included in the sequence as dividing 0!+1 = 2.
The standard heuristic suggests that the fraction of primes in this sequence is 1 - 1/e or about 63%. - Charles R Greathouse IV, Apr 17 2013

Examples

			11 is included in the sequence since 11 divides 5! + 1 = 121.
13 is not included in the sequence since the only n for which 13 divides n! + 1 is n = 12.
		

Crossrefs

Programs

  • PARI
    isA166862(n) = {local(r);r=0;for(i=0,n-2,if((i!+1)%n==0,r=1));r}
    
  • PARI
    is(p)=my(m=Mod(1,p)); for(k=2,p-2,m*=k; if(m==-1, return(isprime(p)))); p==2 \\ Charles R Greathouse IV, Apr 17 2013

A230459 Ordered by increasing m with k < m, a(n) is the n-th record value of gcd(k!+1, m!+1).

Original entry on oeis.org

2, 7, 71, 661, 733, 2371, 3529, 13499, 46549, 98101, 163517, 197933, 1924217, 3322441, 5370731
Offset: 1

Views

Author

James G. Merickel, Oct 19 2013

Keywords

Comments

The pairs (m,k) generating records are (1,0), (6,3), (9,7), (17,8), (89,51), (174,144), (349,228), (422,81), (650,406), (1415,1718), (1697,161), (1622,773), (1884,1219), (7003,2031) and (17057,660).
Heuristics in concert with a database of 'small' (less than, say, 10^12) prime factors of numbers of this kind would generate faster accurate results with near certainty, while any truly proving program is doomed to be relatively slow by comparison (and see following on a(15)).
Note: An auxiliary program employed a limit of 10^8--in lieu of a database--to generate the likely-but-not-certain value of a(15) shown last.

Examples

			a(1)=2, corresponding to m=1 and k=0.  7 is the first value other than 1 to be the greatest common divisor of two different numbers k!+1 and m!+1, where m is increasing and k is allowed to increase to m-1 for a given m (for m=6 and k=3, m!+1=7*103 and k!+1=7); so that a(2)=7.
		

Crossrefs

Programs

  • PARI
    {
    \\ The constant L here is arbitrary.\\
    \\ This does not generate a(1).\\
    rec=2;L=10000;F=vector(L);n=2;
    for(k=1,L,n--;n*=k;n++;F[k]=n);
    for(m=2,L,
      for(k=1,m-1,
        a=gcd(F[m],F[k]);if(a>rec,
          rec=a;print1(a": "m","k"\n"))))
    }

A301346 Largest prime factor of A020549(n) = (n!)^2 + 1.

Original entry on oeis.org

2, 2, 5, 37, 577, 14401, 39877, 251501, 95629553, 131681894401, 13168189440001, 1593350922240001, 2271708245569901, 38775788043632640001, 2404319663572286441, 1272170577304043929, 2938007628841577533852349, 13980942259426143240713449, 1107848353183710355135404972973, 20831587158104092560535861261
Offset: 0

Views

Author

Seiichi Manyama, Mar 19 2018

Keywords

Comments

a(n) = A020549(n) for n in A046029.

Crossrefs

Programs

  • Maple
    a:= n-> max(numtheory[factorset](n!^2+1)):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 19 2018
  • PARI
    a(n) = vecmax(factor(n!^2 + 1)[,1]); \\ Daniel Suteu, Jun 10 2022

Formula

a(n) = A006530(A020549(n)). - Altug Alkan, Mar 19 2018
Previous Showing 11-13 of 13 results.