login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A378157
The least prime dividing !n = A000166(n).
5
2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 11, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 11, 2, 3, 2, 11, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 11, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2
OFFSET
3,1
LINKS
FORMULA
a(n) = A020639(A000166(n)).
a(n) = min(A020639(n-1), A378159(n-2)) for n >= 2.
MATHEMATICA
lpf[n_] := Module[{p = 2}, While[! Divisible[n, p], p = NextPrime[p]]; Array[lpf[Subfactorial[#]] &, 50, 3]
PROG
(PARI) lpf(n) = {my(p = 2); while(n % p, p = nextprime(p+1)); p; }
lista(nmax) = {my(s = 1); for(n = 3, nmax, s = n * s + (-1)^n; print1(lpf(s), ", ")); }
KEYWORD
nonn
AUTHOR
Amiram Eldar, Nov 18 2024
STATUS
approved