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.

A364037 Least number k such that the floor of the average of the distinct prime factors of k is n, or -1 if no such number exists.

Original entry on oeis.org

2, 3, 14, 5, 22, 7, 39, 34, 38, 11, 46, 13, 115, 58, 62, 17, 155, 19, 111, 82, 86, 23, 94, 141, 235, 106, 159, 29, 118, 31, 183, 305, 134, 201, 142, 37, 219, 365, 158, 41, 166, 43, 415, 178, 267, 47, 623, 194, 291, 202, 206, 53, 214, 218, 327, 226, 339, 59, 791, 61
Offset: 2

Views

Author

Jean-Marc Rebert, Jul 02 2023

Keywords

Comments

All terms are squarefree. - Jon E. Schoenfield, Jul 02 2023

Examples

			a(4) = 14, because 14 = 2 * 7, floor((2 + 7) / 2) = 4, and no lesser number satisfies this.
		

Crossrefs

Cf. A363895.

Programs

  • Mathematica
    seq[len_, kmax_] := Module[{s = Table[0, {len}], c = 0, k = 2, i}, While[c < len && k < kmax, i = Floor[Mean[FactorInteger[k][[;; , 1]]]] - 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = k]; k++]; s]; seq[60, 1000] (* Amiram Eldar, Jul 02 2023 *)
  • PARI
    f(n) = my(p = factor(n)[, 1]); vecsum(p)\#p; \\ A363895
    a(n) = my(k=2); while (f(k) != n, k++); k; \\ Michel Marcus, Jul 02 2023

Formula

a(p) = p for prime p. - David A. Corneth, Jul 02 2023