login
A092984
a(n) = the least k >= 1 such that n! + k is squarefree.
2
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,4
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
FORMULA
a(n) = A092983(n) - n!.
EXAMPLE
a(5) = 2 = 122 - 5! = 122 - 120 (as 121 = 11^2 is not squarefree).
MATHEMATICA
Table[SelectFirst[Range@ 10, SquareFreeQ[n! + #] &], {n, 45}] (* Michael De Vlieger, Aug 23 2017 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 28 2004
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
STATUS
approved