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.

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