cp's OEIS Frontend

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.

A360138 a(n) = 1 + A026430(A356133(n)).

This page as a plain text file.
%I A360138 #9 Mar 01 2023 14:28:50
%S A360138 4,7,11,17,20,27,31,34,38,45,49,52,58,61,66,71,74,81,85,88,94,97,101,
%T A360138 108,112,115,119,126,129,135,139,142,146,153,157,160,166,169,173,180,
%U A360138 184,187,191,197,200,206,211,214,220,223,227,233,236,242,247,250
%N A360138 a(n) = 1 +  A026430(A356133(n)).
%C A360138 This is the third 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 A360138 (1) v o u, defined by (v o u)(n)  = v(u(n));
%C A360138 (2) v' o u;
%C A360138 (3) v o u';
%C A360138 (4) v' o u.
%C A360138 Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9, respectively.
%e A360138 (1)  v o u = (2, 6, 9, 10, 13, 15, 16, 19, 22, 24, 25, 28, 29, 32, 36, ...) = A360136
%e A360138 (2)  v' o u = (1, 5, 12, 14, 21, 23, 26, 33, 39, 41, 44, 50, 54, 59, 65, ...) = A360137
%e A360138 (3)  v o u' = (4, 7, 11, 17, 20, 27, 31, 34, 38, 45, 49, 52, 58, 61, 66, ...) = A360138
%e A360138 (4)  v' o u' = (3, 8, 18, 30, 35, 48, 57, 63, 72, 84, 93, 98, 111, 116, ...) = A360139
%t A360138 z = 2000; zz = 100;
%t A360138 u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *)
%t A360138 u1 = Complement[Range[Max[u]], u];  (* A356133 *)
%t A360138 v = u + 1;  (* A285954 *)
%t A360138 v1 = Complement[Range[Max[v]], v];  (* A285953 *)
%t A360138 Table[v[[u[[n]]]], {n, 1, zz}]      (* A360136 *)
%t A360138 Table[v1[[u[[n]]]], {n, 1, zz}]     (* A360137 *)
%t A360138 Table[v[[u1[[n]]]], {n, 1, zz}]     (* A360138 *)
%t A360138 Table[v1[[u1[[n]]]], {n, 1, zz}]    (* A360139 *)
%o A360138 (Python)
%o A360138 def A360138(n): return (m:=3*n-(2 if (n-1).bit_count()&1 else 1))+(m-1>>1)+(m-1&1|(m.bit_count()&1^1))+1 # _Chai Wah Wu_, Mar 01 2023
%Y A360138 Cf. A026530, A359352, A285953, A359277 (intersections instead of results of composition), A359352-A360136, A360138-A360139.
%K A360138 nonn,easy
%O A360138 1,1
%A A360138 _Clark Kimberling_, Feb 03 2023