OFFSET
2,1
COMMENTS
From Rémy Sigrist, Jun 03 2017: (Start)
This sequence is a permutation of the composite numbers (A002808).
a(p) = 2*p for any prime p.
a(2^k) = 2^(k+1) for any n > 0.
For any prime p and n >= 0, a^n(p)/p is the (n+1)-th p-smooth number (where a^n denotes the n-th iterate of a).
a(n) <= 2*n for any n > 1 (as Lpf(2*n) = Lpf(n)).
See also A287932 for the least prime factor equivalent.
(End)
LINKS
Rémy Sigrist, Table of n, a(n) for n = 2..10000
FORMULA
a(n) = A071829(n) + n. - Sean A. Irvine, Aug 16 2024
MATHEMATICA
Array[Which[PrimeQ[#], 2 #, IntegerQ@ Log2[#], 2^(IntegerExponent[#, 2] + 1), True, If[#1 <= #2^2, (#1/#2 + 1) #2, Block[{k = #1/#2 + 1}, While[FactorInteger[k][[-1, 1]] > #2, k++]; k #2]] & @@ {#, FactorInteger[#][[-1, 1]]}] &[#] &, 68, 2] (* Michael De Vlieger, Nov 03 2021 *)
Lpf[x_]:=FactorInteger[x][[-1, 1]]; Array[(k=#; While[Lpf@#!=Lpf@++k]; k)&, 68, 2] (* Giorgos Kalogeropoulos, Nov 03 2021 *)
PROG
(PARI) for(n=2, 120, s=+1; while(abs(component(component(factor(n), 1), omega(n))-component(component(factor(n+s), 1), omega(n+s)))>0, s++); print1(n+s, ", "))
(PARI) a(n) = { my(f = factor(n)[, 1], h = f[#f], s = n\h); for(i = s+1, oo, c = factor(i)[, 1]; if(c[#c] <= h, return(i*h) ) ) } \\ David A. Corneth, Nov 03 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jun 08 2002
STATUS
approved