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 A360403 #21 Jun 20 2025 20:22:13 %S A360403 1,4,9,13,19,22,24,31,36,40,42,49,51,58,64,66,73,76,78,85,87,94,99, %T A360403 103,106,112,117,121,126,129,133,139,144,148,150,157,159,166,171,175, %U A360403 178,184,189,193,199,202,204,210,213,220,225,229,235,238,240,246,253 %N A360403 a(n) = A360393(A026430(n)). %C A360403 This is the second of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences: %C A360403 (1) v o u, defined by (v o u)(n) = v(u(n)); %C A360403 (2) v' o u; %C A360403 (3) v o u'; %C A360403 (4) v' o u. %C A360403 Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9, respectively (and likewise for A360394-A360401). %H A360403 Winston de Greef, <a href="/A360403/b360403.txt">Table of n, a(n) for n = 1..10000</a> %e A360403 (1) v o u = (3, 7, 10, 11, 14, 16, 17, 20, 23, 25, 26, 29, 30, 33, 37, ...) = A360402 %e A360403 (2) v' o u = (1, 4, 9, 13, 19, 22, 24, 31, 36, 40, 42, 49, 51, 58, 64, ...) = A360403 %e A360403 (3) v o u' = (5, 8, 12, 18, 21, 28, 32, 35, 39, 46, 50, 53, 59, 62, 67, ...) = A360404 %e A360403 (4) v' o u' = (2, 6, 15, 27, 34, 45, 55, 60, 69, 81, 91, 96, 108, 114, ...) = A360405 %t A360403 z = 2000; zz = 100; %t A360403 u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *) %t A360403 u1 = Complement[Range[Max[u]], u]; (* A356133 *) %t A360403 v = u + 2; (* A360392 *) %t A360403 v1 = Complement[Range[Max[v]], v]; (* A360393 *) %t A360403 Table[v[[u[[n]]]], {n, 1, zz}] (* A360402 *) %t A360403 Table[v1[[u[[n]]]], {n, 1, zz}] (* A360403 *) %t A360403 Table[v[[u1[[n]]]], {n, 1, zz}] (* A360404 *) %t A360403 Table[v1[[u1[[n]]]], {n, 1, zz}] (* A360405 *) %o A360403 (Python) %o A360403 def A360393(n): %o A360403 if n < 3: return [0, 1, 2][n] %o A360403 return 3*n - 5 - (n-3).bit_count() % 2 %o A360403 def A026430(n): return n+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)) %o A360403 def A360403(n): return A360393(A026430(n)) # _Winston de Greef_, Mar 24 2023 %Y A360403 Cf. A026530, A360392, A360393, A360394-A3546352 (intersections instead of results of compositions), A360398-A360401 (results of reversed compositions), A360402, A360404, A360405. %K A360403 nonn,easy %O A360403 1,2 %A A360403 _Clark Kimberling_, Mar 11 2023