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.

Showing 1-3 of 3 results.

A102440 Replace each prime factor of n that is greater than 3 with the greatest semiprime less than it.

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 6, 8, 9, 8, 10, 12, 10, 12, 12, 16, 15, 18, 15, 16, 18, 20, 22, 24, 16, 20, 27, 24, 26, 24, 26, 32, 30, 30, 24, 36, 35, 30, 30, 32, 39, 36, 39, 40, 36, 44, 46, 48, 36, 32, 45, 40, 51, 54, 40, 48, 45, 52, 58, 48, 58, 52, 54, 64, 40, 60, 65, 60, 66, 48, 69, 72, 69
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 09 2005

Keywords

Examples

			a(99) = a(3*3*11) -> 3*3*[11->2*5] = 3*3*2*5 = 90.
		

Crossrefs

Programs

  • Mathematica
    g[p_] := (* greatest semiprime less than prime p *) g[p] = For[k = p - 1, True, k--, If[PrimeOmega[k] == 2, Return[k]]];
    a[n_] := Product[{p, e} = pe; If[p <= 3, p, g[p]]^e, {pe, FactorInteger[n]}];
    a /@ Range[1, 100] (* Jean-François Alcover, Sep 27 2019 *)

Formula

Multiplicative with prime(i) -> (if i<=2 then prime(i) else A102415(i)).
a(n) <= n and a(n) = n iff n is 3-smooth, see A003586.
A102441(n) = a(a(n)), see A102442, A102443 for iterations.

A102442 Number of iterations needed to transform n by A102440 into a 3-smooth number.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 2, 1, 1, 0, 2, 0, 2, 1, 1, 2, 3, 0, 1, 2, 0, 1, 3, 1, 3, 0, 2, 2, 1, 0, 2, 2, 2, 1, 3, 1, 3, 2, 1, 3, 4, 0, 1, 1, 2, 2, 3, 0, 2, 1, 2, 3, 4, 1, 4, 3, 1, 0, 2, 2, 3, 2, 3, 1, 4, 0, 4, 2, 1, 2, 2, 2, 3, 1, 0, 3, 4, 1, 2, 3, 3, 2, 4, 1, 2, 3, 3, 4, 2, 0, 3, 1, 2, 1, 3, 2, 3, 2, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 09 2005

Keywords

Examples

			A102440(A102440(A102440(41))) = 24 and A102440(24) = 24:
41 -> 3*13 -> 3*[13->2*5] = 2*3*5 -> 2*3*[5->2*2] = 3*2^3 = 24,
therefore a(41) = 3, A102443(41) = 24.
		

Crossrefs

Programs

  • Mathematica
    g[p_] := g[p] = For[k = p - 1, True, k--, If[PrimeOmega[k] == 2, Return[k]]]; f[n_] := Product[{p, e} = pe; If[p <= 3, p, g[p]]^e, {pe, FactorInteger[n]}]; a[n_] := -1 + Length @ NestWhileList[f, n, FactorInteger[#][[-1, 1]] > 3 &]; Array[a, 105] (* Amiram Eldar, Feb 04 2020 after Jean-François Alcover at A102440 *)

Formula

a(n) = 0 iff n is 3-smooth (A003586);
a(A102444(n)) = n and a(m) < n for m < a(A102444(n)).

A102441 a(n) = A102440(A102440(n)).

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 6, 8, 9, 8, 8, 12, 8, 12, 12, 16, 12, 18, 12, 16, 18, 16, 20, 24, 16, 16, 27, 24, 20, 24, 20, 32, 24, 24, 24, 36, 24, 24, 24, 32, 30, 36, 30, 32, 36, 40, 44, 48, 36, 32, 36, 32, 45, 54, 32, 48, 36, 40, 52, 48, 52, 40, 54, 64, 32, 48, 40, 48, 60, 48, 66, 72, 66
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 09 2005

Keywords

Comments

See A102442, A102443 for further iterations of A102440.

Crossrefs

Programs

  • Mathematica
    g[p_] := g[p] = For[k = p - 1, True, k--, If[PrimeOmega[k] == 2, Return[k]]]; f[n_] := Product[{p, e} = pe; If[p <= 3, p, g[p]]^e, {pe, FactorInteger[n]}]; a[n_] := f[f[n]]; Array[a, 100] (* Amiram Eldar, Feb 04 2020 after Jean-François Alcover at A102440 *)
Showing 1-3 of 3 results.