login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A367408
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
1, 2, 3, 4, 5, 12, 18, 8, 6, 14, 21, 28, 35, 84, 126, 16, 7, 20, 27, 36, 45, 108, 162, 72, 54, 140, 189, 252, 315, 756, 1134, 32, 9, 22, 30, 40, 50, 120, 180, 80, 60, 154, 210, 280, 350, 840, 1260, 160, 70, 200, 270, 360, 450, 1080, 1620, 720, 540, 1400, 1890, 2520, 3150, 7560, 11340, 64, 10
OFFSET
1,2
COMMENTS
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).
Sequence is conjectured to be a permutation of the positive integers, A000027.
FORMULA
a(2^k) = 2^k for all k >= 0.
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.
EXAMPLE
a(3) = 3 since k = 1, a(1) = 1, and 3 is the smallest number which has not already occurred.
a(7) = 18, since k = 3, a(3) = 3, m = 6 is the least unused number and 18 has not already occurred.
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).
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved