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.

A076690 Nearest integer to average of the smallest and largest prime factors of n (0.5 is rounded to 1).

Original entry on oeis.org

2, 3, 2, 5, 3, 7, 2, 3, 4, 11, 3, 13, 5, 4, 2, 17, 3, 19, 4, 5, 7, 23, 3, 5, 8, 3, 5, 29, 4, 31, 2, 7, 10, 6, 3, 37, 11, 8, 4, 41, 5, 43, 7, 4, 13, 47, 3, 7, 4, 10, 8, 53, 3, 8, 5, 11, 16, 59, 4, 61, 17, 5, 2, 9, 7, 67, 10, 13, 5, 71, 3, 73, 20, 4, 11, 9, 8, 79, 4, 3, 22, 83, 5, 11, 23, 16
Offset: 2

Views

Author

Joseph L. Pe, Oct 25 2002

Keywords

Examples

			The smallest and largest prime factors of 6 are 2 and 3, respectively, the average of which is 2.5, rounding off to 3. Hence a(6) = 3.
		

Programs

  • Mathematica
    f[n_] := Module[{p, l}, p = Transpose[FactorInteger[n]][[1]]; l = Length[p]; Ceiling[(p[[1]] + p[[l]])/2]]; Table[f[i], {i, 2, 100}]