OFFSET
1,1
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n = 6:
- 6 divides 3!, but neither 5 nor 7 divide 3!,
- 6 divides 4!, but neither 5 nor 7 divide 4!,
- 6 divides 5!, and 5 divides 5!,
- so a(6) = 5.
PROG
(PARI) a(n) = my (f=1); for (k=2, oo, f*=k; if (f % (n*(n+1))==0, return (k), n>1 && f % (n*(n-1))==0, return (k)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 12 2022
STATUS
approved