OFFSET
1,2
COMMENTS
If p is prime, a(p) = p.
The first three integers n for which a(n!) is not a prime number are: 1 (a(1!) = 1), 4 (a(4!) = 4), 10 (a(10!) = 8). Is there a larger n? If such a number n exists, it is greater than 2000.
The smallest integer n satisfying the equation a(n) = a(n+1) is 2400 (a(2400) = a(2401) = 7). Is there a larger n? If such a number n exists, it is greater than 3000.
LINKS
J. Sondow and E. W. Weisstein, MathWorld: Smarandache Function
EXAMPLE
MATHEMATICA
f[n_] := n^(n - 1) * Product[k^DivisorSigma[0, n - k], {k, n - 1}]; a[n_] := Module[{k = 1}, While[! Divisible[f[k], n], k++]; k]; Array[a, 60] (* Amiram Eldar, Dec 08 2018 *)
PROG
(PARI) f(n) = (n^(n-1))*prod(k=1, n-1, k^numdiv(n-k)); \\ A297707
a(n) = {my(k=1); while (f(k) % n, k++); k; } \\ Michel Marcus, Dec 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Lechoslaw Ratajczak, Dec 08 2018
STATUS
approved