%I #15 Dec 19 2019 07:50:59
%S 1,2,6,3,15,7,49,24,8,4,44,22,286,143,47,23,391,195,3705,1852,617,308,
%T 7084,3542,708,354,118,59,1711,855,26505,13252,4417,2208,441,220,8140,
%U 4070,1356,678,27798,13899,597657,298828,99609,49804,2340788,1170394,167199,83599
%N a(1) = 1; for n > 1, a(n) = n*a(n-1) if n is a prime, otherwise a(n) = floor(a(n-1)/A020639(n)), where A020639(n) is the smallest prime divisor of n.
%C The sequence contains 3291 nonzero terms, after which a(3292) and all subsequent terms equal 0. The largest term is a(1627) = 1739701024619973666776171644354261426018152354833927524.
%H Scott R. Shannon, <a href="/A330252/b330252.txt">Table of n, a(n) for n = 1..3292</a>.
%e a(3) = 6 as n = 3 is prime and 3 * a(2) = 3 * 2 = 6.
%e a(4) = 3 as n = 4 is composite with a smallest prime divisor of 2, thus a(4) = floor(a(3)/2) = floor(6/2) = 3.
%e a(15) = 47 as n = 15 is composite with a smallest prime divisor of 3, thus a(15) = floor(a(14)/3) = floor(143/3) = 47.
%t a[1] = 1; a[n_] := a[n] = If[PrimeQ[n], n*a[n - 1], Floor[a[n - 1] / FactorInteger[n][[1, 1]]]]; Array[a, 50] (* _Amiram Eldar_, Dec 07 2019 *)
%Y Cf. A000040, A020639, A330253.
%K nonn
%O 1,2
%A _Scott R. Shannon_, Dec 07 2019