login
a(n) = n for n a power of 2; otherwise let 2^r be the greatest power of 2 which does not exceed n, then a(n) = the least novel m*a(k) where k = n - 2^r, and m is not a prior term.
0

%I #17 Dec 31 2023 00:15:55

%S 1,2,3,4,5,12,18,8,6,14,21,28,35,84,126,16,7,20,27,36,45,108,162,72,

%T 54,140,189,252,315,756,1134,32,9,22,30,40,50,120,180,80,60,154,210,

%U 280,350,840,1260,160,70,200,270,360,450,1080,1620,720,540,1400,1890,2520,3150,7560,11340,64,10

%N a(n) = n for n a power of 2; otherwise let 2^r be the greatest power of 2 which does not exceed n, then a(n) = the least novel m*a(k) where k = n - 2^r, and m is not a prior term.

%C Based on a recursion similar to that which produces the Doudna sequence, A005940, using the same definition of k, the "distance" from the greatest power of 2 less than n (compare with A365436).

%C Sequence is conjectured to be a permutation of the positive integers, A000027.

%F a(2^k) = 2^k for all k >= 0.

%F a(2^k + 1) = m, the least unused term up to a(2^k), where multiples (other than 1) of m have been used to generate terms between a(2^(k-1)) and a(2^k) except for those which have occurred earlier; see Example.

%e a(3) = 3 since k = 1, a(1) = 1, and 3 is the smallest number which has not already occurred.

%e a(7) = 18, since k = 3, a(3) = 3, m = 6 is the least unused number and 18 has not already occurred.

%e For n = 18, k = 2, a(2) = 2, m = 9 is the least unused number, so we should expect a(18) = 2*9 = 18, but 18 has already occurred at a(7). Therefore we increment to m = 10, the next smallest unused number, and find a(18) = 20 (which has not occurred previously).

%o (PARI) lista(nn) = my(va=vector(nn)); for (n=1, nn, my(p=2^logint(n, 2)); if (p == n, va[n] = n, my(k=n-p, m=1); while (#select(x->(x==m), va) || #select(x->(x==m*va[k]), va), m++); va[n] = m*va[k];);); va; \\ _Michel Marcus_, Dec 17 2023

%Y Cf. A005940, A053644, A365436.

%K nonn

%O 1,2

%A _David James Sycamore_, Nov 17 2023