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 A381420 #18 Mar 11 2025 09:01:23 %S A381420 1,3,15,5,25,10,2,6,4,12,8,14,16,18,21,9,27,24,22,20,26,30,28,32,34, %T A381420 38,36,39,13,65,35,40,42,33,11,55,44,46,48,45,50,54,52,58,56,60,62,64, %U A381420 66,51,17,85,68,70,63,7,77,49,91,78,69,23,115,75,72,57,19,95,76,80,74,86,82,90 %N A381420 a(1) = 1, a(2) = 3; for n > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) and has a different binary weight than a(n-1). %C A381420 Unlike the EKG sequence A064413 the primes do not appear in their natural order. The only fixed points in the terms studied are 1 and 20, and it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers. %H A381420 Scott R. Shannon, <a href="/A381420/b381420.txt">Table of n, a(n) for n = 1..10000</a> %H A381420 Scott R. Shannon, <a href="/A381420/a381420.png">Image of the first 100000 terms</a>. The green line is a(n) = n. %e A381420 a(4) = 5 as a(3) = 15 which shares a factor with 5 while the binary weight of 5 (101_2) is 2 while the binary weight of 15 (1111_2) is 4. %o A381420 (PARI) lista(n)= my(i=1, j=0, r=Vec([1], n), s=List(), u=1); while(i<n, j++; if(#s<=j, listput(~s, u++)); if(((1==r[i]) || (1!=gcd(r[i], s[j]))) && hammingweight(r[i]) != hammingweight(s[j]), r[i++]=s[j]; listpop(~s, j); j=0)); r; \\ _Ruud H.G. van Tol_, Mar 10 2025 %Y A381420 Cf. A381419, A000120, A109451, A064413, A093714, A027748. %K A381420 nonn,base %O A381420 1,2 %A A381420 _Scott R. Shannon_, Feb 23 2025