OFFSET
1,2
COMMENTS
This endomorphism a:N->N replaces the largest prime factor in n with the prime preceding it. For coherence, when there is no prime divisor or when the largest one is 2, a(n)=n. Some interesting properties: a(n)<=n; bigomega(a(n)) = bigomega(n); invariant elements of a(n) are the powers of 2 (A000079), all primes form a simple orbit terminating with 2 and containing no composite, 2^m terminates orbits of all numbers with m prime factors (with multiplicity); etc.
LINKS
Stanislav Sykora, Table of n, a(n) for n = 1..10000
S. Sykora, PARI scripts: PrimesRelatedFunctions
EXAMPLE
a(28)=a(2*2*7)=2*2*5=20, a(20)=12, a(12)=8, a(8)=8.
MATHEMATICA
Table[Times @@ If[Last@ # > 2, ReplacePart[#, {-1} -> NextPrime[Last@ #, -1]], #] &@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ n, {1}], {n, 75}] (* Michael De Vlieger, Apr 11 2016 *)
PROG
(PARI) A233511(n)=local(p); p=LargestPrimeFactor(n); return
((n\p)*PreviousPrime(p)) \\ See the links for the auxiliary scripts
CROSSREFS
KEYWORD
nonn
AUTHOR
Stanislav Sykora, Dec 11 2013
STATUS
approved