Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #33 Jun 04 2017 16:37:50
%S 4,9,6,25,8,49,10,15,12,121,14,169,16,21,18,289,20,361,22,27,24,529,
%T 26,35,28,33,30,841,32,961,34,39,36,55,38,1369,40,45,42,1681,44,1849,
%U 46,51,48,2209,50,77,52,57,54,2809,56,65,58,63,60,3481,62,3721,64
%N a(n) = least k > n such that lpf(n) = lpf(k), where lpf = least prime factor (A020639).
%C This sequence is a permutation of the composite numbers (A002808).
%C a(p) = p^2 for any prime p (see A001248).
%C a(2*k) = 2*k + 2 for any k > 1.
%C For any prime p and n >= 0, a^n(p)/p is the (n+1)-th p-rough number (where a^n denotes the n-th iterate of a).
%C See also A071830 for the largest prime factor equivalent.
%H Rémy Sigrist, <a href="/A287932/b287932.txt">Table of n, a(n) for n = 2..10000</a>
%t lpf[n_] := FactorInteger[n][[1, 1]]; a[n_] := Block[{k, p = lpf[n]}, k=n+p; While[lpf[k] != p, k += p]; k]; Array[a, 61, 2] (* _Giovanni Resta_, Jun 04 2017 *)
%o (PARI) a(n) = my (l=factor(n)[1,1]); forstep (v=n+l, oo, l, if (factor(v)[1,1]==l, return (v)))
%Y Cf. A002808, A020639, A071830.
%Y A001248 is a subsequence.
%K nonn
%O 2,1
%A _Rémy Sigrist_, Jun 03 2017