login

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

The least prime dividing !n = A000166(n).
5

%I #9 Nov 19 2024 00:58:56

%S 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,

%T 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,

%U 2,5,2,67,2,3,2,71,2,73,2,3,2,7,2,79,2,3,2

%N The least prime dividing !n = A000166(n).

%H Amiram Eldar, <a href="/A378157/b378157.txt">Table of n, a(n) for n = 3..10000</a>

%F a(n) = A020639(A000166(n)).

%F a(n) = min(A020639(n-1), A378159(n-2)) for n >= 2.

%t lpf[n_] := Module[{p = 2}, While[! Divisible[n, p], p = NextPrime[p]]; Array[lpf[Subfactorial[#]] &, 50, 3]

%o (PARI) lpf(n) = {my(p = 2); while(n % p, p = nextprime(p+1)); p;}

%o lista(nmax) = {my(s = 1); for(n = 3, nmax, s = n * s + (-1)^n; print1(lpf(s), ", ")); }

%Y Cf. A000166, A020639, A152024, A195207, A195208, A195209, A195210, A378158, A378159.

%K nonn

%O 3,1

%A _Amiram Eldar_, Nov 18 2024