%I #15 Sep 03 2015 10:46:23
%S 1,2,3,4,5,6,7,9,12,15,8,18,10,21,16,20,11,24,13,30,28,27,14,32,22,33,
%T 36,42,17,40,19,48,44,39,45,54,23,51,52,56,25,64,26,60,66,57,29,50,34,
%U 72,68,78,31,80,63,88,76,69,35,84,37,75,90,49,81,96,38,102,92,70,41,108
%N a(1) = 1. a(n) = smallest positive multiple of (number of earlier terms in sequence which divide n) which has yet to appear in the sequence.
%H Ivan Neretin, <a href="/A126327/b126327.txt">Table of n, a(n) for n = 1..10000</a>
%e There are three terms among the first 8 terms of the sequence which divide 9 (a(1)=1,a(3)=3,a(8)=9). So a(9) is the smallest multiple of 3 which does not occur among the first 8 terms of the sequence. 3,6 and 9 occur earlier in the sequence, so a(9) = 12.
%t a = {1}; Do[AppendTo[a, Min[Complement[Range[Max[a] + 1]*Count[a, x_ /; Divisible[n, x]], a]]], {n, 2, 72}]; a (* _Ivan Neretin_, Sep 03 2015 *)
%o (PARI) S=Set([1]); for(n=2,100, d=length(setintersect(S,Set(divisors(n)))); k=d; while(setsearch(S,k),k+=d); S=setunion(S,[k]); print1(k,", "); ) \\ _Max Alekseyev_, Jun 02 2007
%K nonn,look
%O 1,2
%A _Leroy Quet_, Mar 09 2007
%E More terms from _Max Alekseyev_, Jun 02 2007
|