login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest k > n such that Lpf(n) = Lpf(k) where Lpf(x) denotes the largest prime factor in x factorization.
3

%I #26 Aug 16 2024 20:15:33

%S 4,6,8,10,9,14,16,12,15,22,18,26,21,20,32,34,24,38,25,28,33,46,27,30,

%T 39,36,35,58,40,62,64,44,51,42,48,74,57,52,45,82,49,86,55,50,69,94,54,

%U 56,60,68,65,106,72,66,63,76,87,118,75,122,93,70,128,78,77,134,85,92

%N Smallest k > n such that Lpf(n) = Lpf(k) where Lpf(x) denotes the largest prime factor in x factorization.

%C From _Rémy Sigrist_, Jun 03 2017: (Start)

%C This sequence is a permutation of the composite numbers (A002808).

%C a(p) = 2*p for any prime p.

%C a(2^k) = 2^(k+1) for any n > 0.

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

%C a(n) <= 2*n for any n > 1 (as Lpf(2*n) = Lpf(n)).

%C See also A287932 for the least prime factor equivalent.

%C (End)

%H Rémy Sigrist, <a href="/A071830/b071830.txt">Table of n, a(n) for n = 2..10000</a>

%F a(n) = A071829(n) + n. - _Sean A. Irvine_, Aug 16 2024

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

%t Lpf[x_]:=FactorInteger[x][[-1,1]];Array[(k=#;While[Lpf@#!=Lpf@++k];k)&,68,2] (* _Giorgos Kalogeropoulos_, Nov 03 2021 *)

%o (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,","))

%o (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

%Y Cf. A002808, A006530, A071829, A287932.

%K nonn,easy

%O 2,1

%A _Benoit Cloitre_, Jun 08 2002