OFFSET

1,2

COMMENTS

The sequence contains 3291 nonzero terms, after which a(3292) and all subsequent terms equal 0. The largest term is a(1627) = 1739701024619973666776171644354261426018152354833927524.

LINKS

Scott R. Shannon, Table of n, a(n) for n = 1..3292.

EXAMPLE

a(3) = 6 as n = 3 is prime and 3 * a(2) = 3 * 2 = 6.

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.

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.

MATHEMATICA

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 *)

CROSSREFS

KEYWORD

nonn

AUTHOR

Scott R. Shannon, Dec 07 2019

STATUS

approved