login
A126327
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.
1
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, 36, 42, 17, 40, 19, 48, 44, 39, 45, 54, 23, 51, 52, 56, 25, 64, 26, 60, 66, 57, 29, 50, 34, 72, 68, 78, 31, 80, 63, 88, 76, 69, 35, 84, 37, 75, 90, 49, 81, 96, 38, 102, 92, 70, 41, 108
OFFSET
1,2
LINKS
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
Sequence in context: A371248 A059759 A042952 * A328116 A193286 A098132
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Mar 09 2007
EXTENSIONS
More terms from Max Alekseyev, Jun 02 2007
STATUS
approved