OFFSET
2,2
COMMENTS
Old name: Greatest number strictly less than n with same factorization pattern.
Here we call a number "comparable" if it is in the specified neighborhood of n. For n > 1, A064802(n) is the next larger comparable number. If n is not a power of 2, the ratio of a(n) to n is the ratio of successive primes.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 2..10000
EXAMPLE
a(18)=12 because 18=2*3*3 and next smaller comparable factorization is 2*2*3=12 (A127185(18,12) = 2).
MATHEMATICA
f[n_] := Block[{g, h}, g[x_] := Flatten[Table[#1, {#2}] & @@@ FactorInteger@ x]; h[x_] := If[x == 2, 1, NextPrime[x, -1]]; If[n == 1, 1, Max[Times @@ MapAt[h, g[n], #] & /@ Range[Length@ g[n]]]]]; Table[f@ i, {i, 2, 74}] (* Michael De Vlieger, Jan 31 2015 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Marc LeBrun, May 06 2004
EXTENSIONS
Edited, with new name, by Peter Munn, Oct 10 2023
STATUS
approved