Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #20 Jun 20 2017 23:13:43
%S 1,1,3,7,19,3,3,3,3,43,7,3,113,73,3,3,3,3,3,3,3,3,3,3,3,3,3,7,17,3,
%T 719,7,3,3,3,3,967,9539,3,17,47,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
%U 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,19
%N Least prime factor of n-th central trinomial coefficient (A002426).
%C A002426(n) is prime for n = 2, 3, 4, no more through 10^5. A002426 is semiprime iff A102445(n) = 2 (as is the case for n = 5, 6, 7, 9, 10, 12, 13).
%H Robert Israel, <a href="/A212848/b212848.txt">Table of n, a(n) for n = 0..729</a>
%F a(n) = A020639(A002426(n)).
%e a(9) = 43 because A002426(9) = 3139 = 43 * 73.
%p A002426:= gfun:-rectoproc({(n+2)*a(n+2)-(2*n+3)*a(n+1)-3*(n+1)*a(n) = 0, a(0)=1, a(1)=1},a(n),remember):
%p lpf:= proc(n) local F;
%p F:= map(proc(t) if t[1]::integer then t[1] else NULL fi end proc,
%p ifactors(n, easy)[2]);
%p if nops(F) > 0 then min(F)
%p else min(numtheory:-factorset(n))
%p fi
%p end proc:
%p lpf(1):= 1:
%p map(lpf @ A002426, [$0..100]); # _Robert Israel_, Jun 20 2017
%t a = b = 1; t = Join[{a, b}, Table[c = ((2 n - 1) b + 3 (n - 1) a)/n; a = b; b = c; c, {n, 2, 100}]]; Table[FactorInteger[n][[1, 1]], {n, t}] (* _T. D. Noe_, May 30 2012 *)
%o (PARI) a(n) = my(x=polcoeff((1 + x + x^2)^n, n)); if (x==1, 1, vecmin(factor(x)[,1])); \\ _Michel Marcus_, Jun 20 2017
%Y Cf. A000040, A002426, A020639, A102445, A212791.
%K nonn,easy
%O 0,3
%A _Jonathan Vos Post_, May 28 2012