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

A066856 a(n) = omega(n!+1), where omega is the number of distinct primes dividing n, A001221.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 1, 2, 2, 2, 3, 5, 3, 6, 2, 2, 3, 3, 3, 2, 2, 2, 1, 2, 3, 5, 4, 4, 5, 2, 5, 6, 1, 2, 4, 7, 1, 3, 4, 3, 3, 3, 4, 2, 5, 5, 6, 4, 4, 2, 2, 4, 3, 4, 2, 4, 4, 3, 5, 3, 4, 5, 4, 5, 6, 5, 2, 7, 1, 4, 2, 3, 1, 6, 3, 4, 7, 3, 3, 3, 5, 5, 4, 3, 8, 3, 6, 2, 4, 3, 4, 5, 6, 6, 5, 5, 4, 5
Offset: 1

Views

Author

Robert G. Wilson v, Jan 21 2002

Keywords

Comments

103!+1 = 27437*31084943*C153, so a(103) is unknown until this 153-digit composite is factored. a(104) = 4 and a(105) = 6. - Rick L. Shepherd, Jun 09 2003

Crossrefs

Cf. A054990 (bigomega(n!+1)), A002981 (n!+1 is prime), A064237 (n!+1 divisible by a square), A084846 (mu(n!+1)).

Programs

  • Magma
    [#PrimeDivisors(Factorial(n) + 1): n in [1..55]]; // Vincenzo Librandi, Oct 11 2018
  • Mathematica
    Table[ Length[ FactorInteger[ n! + 1]], {n, 1, 15}]
    PrimeNu[Range[50]! + 1] (* Paolo Xausa, Feb 07 2025 *)
  • PARI
    for(n=1,64,print1(omega(n!+1),","))
    

Extensions

More terms from Rick L. Shepherd, Jun 09 2003

A084846 mu(n!+1), where mu is the Moebius function (A008683).

Original entry on oeis.org

-1, -1, -1, -1, 0, 0, 1, 0, 1, -1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1
Offset: 0

Views

Author

Rick L. Shepherd, Jun 10 2003

Keywords

Examples

			a(6)=1 because 6!+1 = 721 = 7 * 103, the product of two different primes and thus mu(6!+1) = (-1)^2 = 1.
		

Crossrefs

Cf. A008683 (mu(n)), A054990 (bigomega(n!+1)), A066856 (omega(n!+1)), A064237 (n!+1 divisible by a square), A002981 (n!+1 is prime).

Programs

  • Magma
    [MoebiusMu(Factorial(n)+1) : n in [1..45]];
    
  • Mathematica
    MoebiusMu[Range[0, 50]! + 1] (* Paolo Xausa, Feb 07 2025 *)
  • PARI
    for(n=0,45,print1(moebius(n!+1),","))

Formula

If n is in A064237, then a(n) = 0. Otherwise a(n) = (-1)^A054990(n) = (-1)^A066856(n). - Max Alekseyev, Oct 08 2019

Extensions

a(112) corrected, a(113)-a(114) added by Max Alekseyev, May 28 2015
a(106)-a(107) corrected by Amiram Eldar, Oct 03 2019

A092984 a(n) = the least k >= 1 such that n! + k is squarefree.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Amarnath Murthy, Mar 28 2004

Keywords

Comments

Conjecture: There exists a finite k such that a(n) < k for all n. Subsidiary sequence: Index of the first occurrence of n in this sequence. In case the conjecture is true, this sequence would be finite.
If a(n) = 2 ==> n!+1 is divisible by a square (sequence A064237). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 29 2004

Examples

			a(5) = 2 = 122 - 5! = 122 - 120 (as 121 = 11^2 is not squarefree).
		

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range@ 10, SquareFreeQ[n! + #] &], {n, 45}] (* Michael De Vlieger, Aug 23 2017 *)
    Table[Module[{k=1,c=n!},While[!SquareFreeQ[c+k],k++];k],{n,110}] (* Harvey P. Dale, Jul 14 2025 *)
  • PARI
    a(n)=for(i=1,n!,if(issquarefree(n!+i),return(i)))
    
  • PARI
    A092984(n) = { my(k=1); while(!issquarefree(n!+k), k++); k; }; \\ Antti Karttunen, Aug 22 2017

Formula

a(n) = A092983(n) - n!.

Extensions

More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 29 2004
More terms from David Wasserman, Sep 27 2006
Typo in description corrected by Antti Karttunen, Aug 22 2017

A115091 Primes p such that p^2 divides m!+1 for some integer m

Original entry on oeis.org

5, 11, 13, 47, 71, 563, 613
Offset: 1

Views

Author

T. D. Noe, Mar 01 2006

Keywords

Comments

By Wilson's theorem, we know that there is an m=p-1 such that p divides m!+1. Sequence A115092 gives the number of m for each prime. Occasionally p^2 also divides m!+1. These primes seem to be only slightly more plentiful than Wilson primes (A007540). No other primes < 10^6.
There is no prime p < 10^8 such that p^2 divides m!+1 for some m <= 1200. [From F. Brunault (brunault(AT)gmail.com), Nov 23 2008]
For a(n), m = p-A259230(n). - Felix Fröhlich, Jan 24 2016

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd Ed., New York, Springer-Verlag, 2004, Section A2.

Crossrefs

Cf. A064237 (n!+1 is divisible by a square), A259230.

Programs

  • Mathematica
    nn=1000; lst={}; Do[p=Prime[i]; p2=p^2; f=1; m=1; While[m
  • PARI
    forprime(p=1, , for(k=1, p-1, if(Mod((p-k)!, p^2)==-1, print1(p, ", "); break({1})))) \\ Felix Fröhlich, Jan 24 2016

A152219 Numbers k such that k! - 1 is divisible by a square greater than one.

Original entry on oeis.org

9, 15, 105, 112, 609, 4929
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2008

Keywords

Comments

Primes p such that p^2 divides m!-1 for some integer m

Crossrefs

Cf. A064237.

Programs

  • Mathematica
    aa = {}; Do[If[(Sqrt[n! - 1] /. Sqrt[_] -> 1) > 1, Print[n]; AppendTo[aa, n]], {n, 1, 1000}]; aa
    (* alternate program *)
    nfdsQ[n_]:=AnyTrue[Rest[Divisors[n!-1]],IntegerQ[Sqrt[#]]&]; Select[Range[ 2,610],nfdsQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 24 2020 *)

Extensions

a(6) from Artur Jasinski, Nov 30 2008
Definition clarified by Harvey P. Dale, May 24 2020

A152220 Primes p such that p^2 divides m!-1 for some integer m < p.

Original entry on oeis.org

11, 31, 107, 571, 971, 4931
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2008

Keywords

Comments

For numbers k such that k! - 1 is divisible by a square see A152219.
a(7) > 60000, if it exists. - Amiram Eldar, Oct 23 2024

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[If[(Sqrt[n! - 1] /. Sqrt[] -> 1) > 1, Print[(Sqrt[n! - 1] /. Sqrt[] -> 1)]; AppendTo[aa, (Sqrt[n! - 1] /. Sqrt[_] -> 1)]], {n, 1, 1000}]; aa
    q[p_] := Module[{m = 2}, While[m < p && ! Divisible[m! - 1, p^2], m++]; Divisible[m! - 1, p^2]]; Select[Prime[Range[660]], q] (* Amiram Eldar, Oct 23 2024 *)
  • PARI
    is(p) = if(isprime(p), my(m = 2); while(m < p && (m! - 1) % (p^2), m++); !((m! - 1) % (p^2)), 0); \\ Amiram Eldar, Oct 23 2024

Extensions

a(6) from Artur Jasinski, Nov 30 2008
Showing 1-6 of 6 results.