%I #18 Aug 27 2022 04:06:40
%S 1,2,3,5,4,6,7,10,9,8,11,13,12,14,15,19,16,18,17,21,20,22,23,26,25,24,
%T 29,28,27,30,31,36,32,33,34,37,35,38,39,42,40,41,43,45,46,44,47,51,49,
%U 50,48,53,52,56,54,58,55,57,59,61,60,62,64,69,63,65,66,68,67,70,71,74
%N a(1)=1. a(n) = (the highest exponent in the prime-factorization of n)th integer from among those positive integers not occurring earlier in the sequence.
%C This sequence is a permutation of the positive integers.
%H Ivan Neretin, <a href="/A123917/b123917.txt">Table of n, a(n) for n = 1..10000</a>
%e 12 has a prime-factorization of 2^2 *3^1 and the highest exponent is 2. So a(12) is the 2nd integer from among those positive integers not occurring among the first 11 terms of the sequence (i.e., the second integer from 12,13,14,...). So a(12) = 13.
%t f[l_List] := Block[{k = 0, c = Max @@ Last /@ FactorInteger[Length[l] + 1]},While[c > 0,k++;While[MemberQ[l, k], k++ ];c--;];Append[l, k]];Nest[f, {1}, 75] (* _Ray Chandler_, Nov 23 2006 *)
%t Fold[Append[#1, Complement[Range[Log2[#2] + Max[#1]], #1][[Max[FactorInteger[#2][[All, 2]]]]]] &, {1}, Range[2, 72]] (* _Ivan Neretin_, Aug 29 2017 *)
%K nonn
%O 1,2
%A _Leroy Quet_, Nov 19 2006
%E Extended by _Ray Chandler_, Nov 23 2006
|