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.

A366387 Divide n by its smallest prime factor, then multiply with the index of that same prime; a(1) = 0 by convention.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 6, 5, 5, 6, 6, 7, 10, 8, 7, 9, 8, 10, 14, 11, 9, 12, 15, 13, 18, 14, 10, 15, 11, 16, 22, 17, 21, 18, 12, 19, 26, 20, 13, 21, 14, 22, 30, 23, 15, 24, 28, 25, 34, 26, 16, 27, 33, 28, 38, 29, 17, 30, 18, 31, 42, 32, 39, 33, 19, 34, 46, 35, 20, 36, 21, 37, 50, 38, 44, 39, 22, 40, 54, 41, 23, 42, 51
Offset: 1

Views

Author

Antti Karttunen, Oct 23 2023

Keywords

Crossrefs

Cf. A196050 (number of iterations needed to reach 1), A324923.
Cf. also A366385, and A060681 (divide by the smallest prime p, then multiply with p-1),

Programs

  • Mathematica
    Array[PrimePi[#2]*#1/#2 & @@ {#, FactorInteger[#][[1, 1]]} &, 85] (* Michael De Vlieger, Oct 23 2023 *)
  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    A366387(n) = { my(spf=A020639(n)); primepi(spf)*(n/spf); };

Formula

a(n) = A032742(n) * A055396(n) = (n/A020639(n)) * A000720(A020639(n)).
a(2n) = n, a(3*(2n+1)) = 2*(2n+1) = 4n + 2.