This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A367408 #23 Jul 01 2025 23:33:57 %S A367408 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 A367408 54,140,189,252,315,756,1134,32,9,22,30,40,50,120,180,80,60,154,210, %U A367408 280,350,840,1260,160,70,200,270,360,450,1080,1620,720,540,1400,1890,2520,3150,7560,11340,64,10 %N 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. %C A367408 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 A367408 Sequence is conjectured to be a permutation of the positive integers, A000027. %H A367408 Michael De Vlieger, <a href="/A367408/b367408.txt">Table of n, a(n) for n = 1..16384</a> %H A367408 Michael De Vlieger, <a href="/A367408/a367408.png">Plot prime(i)^m | a(n) at (x,y) = (n,i)</a>, 64X vertical exaggeration, with a color function showing m = 1 in black, m = 2 in red, m = 3 in orange, ..., m = 16 in magenta. %F A367408 a(2^k) = 2^k for all k >= 0. %F A367408 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 A367408 a(3) = 3 since k = 1, a(1) = 1, and 3 is the smallest number which has not already occurred. %e A367408 a(7) = 18, since k = 3, a(3) = 3, m = 6 is the least unused number and 18 has not already occurred. %e A367408 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). %t A367408 Block[{a, c, k, m, t, nn}, %t A367408 nn = 128; c[_] := False; c[1] = True; m[_] := 1; a[1] = 1; %t A367408 Do[If[IntegerQ[#], Set[k, i], %t A367408 While[Or[c[m[#]], c[Set[k, # m[#]]]], m[#]++] &[ %t A367408 a[i - 2^Floor[#]]]] &@ Log2[i]; %t A367408 Set[{a[i], c[k]}, {k, True}], {i, nn}]; %t A367408 Array[a, nn] ] (* _Michael De Vlieger_, Jul 01 2025 *) %o A367408 (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 A367408 Cf. A005940, A053644, A365436. %K A367408 nonn %O A367408 1,2 %A A367408 _David James Sycamore_, Nov 17 2023