cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A330252 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.

Original entry on oeis.org

1, 2, 6, 3, 15, 7, 49, 24, 8, 4, 44, 22, 286, 143, 47, 23, 391, 195, 3705, 1852, 617, 308, 7084, 3542, 708, 354, 118, 59, 1711, 855, 26505, 13252, 4417, 2208, 441, 220, 8140, 4070, 1356, 678, 27798, 13899, 597657, 298828, 99609, 49804, 2340788, 1170394, 167199, 83599
Offset: 1

Views

Author

Scott R. Shannon, Dec 07 2019

Keywords

Comments

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

Examples

			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.
		

Crossrefs

Programs

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