%I #26 Sep 08 2022 08:45:39
%S 1,1,2,5,2,2,2,3,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,7,2,2,
%T 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,
%U 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
%N Smallest prime divisor of Catalan number A000108(n), with a(0) = a(1) = 1.
%C a(n) <> 2 iff n = 2^k - 1 (A000225). In fact for k>1, a(2^k-1): 5, 3, 3, 7, 3, 3, 7, 3, 3, 3, 3, 3, 3, ..., . (A120275) - _Robert G. Wilson v_, Nov 14 2015
%H Antti Karttunen, <a href="/A152765/b152765.txt">Table of n, a(n) for n = 0..65537</a>
%F a(n) = A020639(A000108(n)). - _Michel Marcus_, Nov 14 2015
%t FactorInteger[#][[1,1]]&/@CatalanNumber[Range[2,80]] (* _Harvey P. Dale_, Oct 08 2014 *)
%o (PARI) a(n) = if (n<=1, 1, factor(binomial(2*n, n)/(n+1))[1, 1]); \\ _Michel Marcus_, Nov 14 2015; corrected Jun 13 2022
%o (PARI) A152765(n) = if(n<2,1,my(c=binomial(2*n, n)/(n+1)); forprime(p=2, oo, if(!(c%p),return(p)))); \\ _Antti Karttunen_, Jan 12 2019
%o (Magma) [Minimum(PrimeDivisors(Catalan(n))): n in [2..100]]; // _Vincenzo Librandi_, Jan 04 2017
%Y Cf. A000108, A000225, A120275, A120303, A139044, A152761, A152762, A152763.
%K nonn
%O 0,3
%A _Omar E. Pol_, Dec 15 2008, Jan 03 2009
%E Terms a(0) = a(1) = 1 prepended and more terms added by _Antti Karttunen_, Jan 12 2019