login
Replace the largest prime factor p>2 in n (if any) with the prime preceding p.
2

%I #26 Apr 11 2016 09:41:03

%S 1,2,2,4,3,4,5,8,6,6,7,8,11,10,9,16,13,12,17,12,15,14,19,16,15,22,18,

%T 20,23,18,29,32,21,26,25,24,31,34,33,24,37,30,41,28,27,38,43,32,35,30,

%U 39,44,47,36,35,40,51,46,53,36,59,58,45,64,55,42,61,52,57,50,67,48,71,62,45

%N Replace the largest prime factor p>2 in n (if any) with the prime preceding p.

%C 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.

%H Stanislav Sykora, <a href="/A233511/b233511.txt">Table of n, a(n) for n = 1..10000</a>

%H S. Sykora, <a href="https://oeis.org/wiki/File:PrimesRelatedFunctions.txt">PARI scripts: PrimesRelatedFunctions</a>

%e a(28)=a(2*2*7)=2*2*5=20, a(20)=12, a(12)=8, a(8)=8.

%t 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 *)

%o (PARI) A233511(n)=local(p);p=LargestPrimeFactor(n);return

%o ((n\p)*PreviousPrime(p)) \\ See the links for the auxiliary scripts

%Y Cf. A000040 (primes), A000079 (powers of 2), A233570.

%K nonn

%O 1,2

%A _Stanislav Sykora_, Dec 11 2013