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 A359268 #7 Feb 02 2023 14:41:52 %S A359268 0,1,0,3,4,1,6,7,8,9,0,11,12,13,14,15,16,17,18,3,4,1,22,23,24,25,26, %T A359268 27,28,29,30,31,32,33,34,35,36,37,6,7,8,9,0,43,44,45,46,47,48,49,50, %U A359268 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69 %N A359268 a(n) is the least k such that A359194(k) = A359194(n). %H A359268 Rémy Sigrist, <a href="/A359268/b359268.txt">Table of n, a(n) for n = 0..8192</a> %F A359268 a(n) = 0 iff n belongs to A020988. %F A359268 a(n) = 1 iff n belongs to A002450 \ {0}. %e A359268 The first terms, alongside A359194(n), are: %e A359268 n a(n) A359194(n) %e A359268 -- ---- ---------- %e A359268 0 0 1 %e A359268 1 1 0 %e A359268 2 0 1 %e A359268 3 3 6 %e A359268 4 4 3 %e A359268 5 1 0 %e A359268 6 6 13 %e A359268 7 7 10 %e A359268 8 8 7 %e A359268 9 9 4 %e A359268 10 0 1 %e A359268 11 11 30 %e A359268 12 12 27 %o A359268 (PARI) b(n) = if(n, bitneg(3*n, exponent(3*n)+1), 1) %o A359268 a(n) = { my (v=b(n)); while (n, my (x=exponent(n)); if (b(n-2^x)==v, n-=2^x, break)); return (n) } %Y A359268 Cf. A002450, A020988, A359194, A359259. %K A359268 nonn,base %O A359268 0,4 %A A359268 _Rémy Sigrist_, Dec 23 2022