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 A358432 #26 Jan 01 2023 09:46:35 %S A358432 0,1,6,7,10,11,12,13,14,15,16,17,18,19,20,21,24,25,30,31,34,35,36,37, %T A358432 40,41,86,87,90,91,92,93,96,97,102,103,106,107,108,109,110,111,112, %U A358432 113,114,115,116,117,120,121,126,127,130,131,132,133,136,137,150,151 %N A358432 Nonnegative integers m which can be represented using only 0's and 1's in the complex base 1+i, i.e., m = c(0) + c(1)*(1+i) + c(2)*(1+i)^2 + ... where each coefficient c(k) is either 0 or 1. %D A358432 Problem 12335, American Mathematical Monthly, Vol. 129, issue 7, August-September 2022. %H A358432 Wikipedia, <a href="https://en.wikipedia.org/wiki/Complex-base_system">Complex-base system</a>. %e A358432 6 is in the sequence since 6 = T^2 + T^3 + T^4 + T^5 + T^8, where T=1+i. %t A358432 cpol[a_, b_] := %t A358432 Module[{u, uu, v, vv, p, pp, q, L, x, k, W}, u = a; v = b; p = {}; %t A358432 W = {-2 - I, 0, -1 + 2*I}; %t A358432 While[(u + 1)^2 + v^2 > 1, %t A358432 If[Mod[u + v, 2] == %t A358432 0, {uu = (u + v)/2; vv = (v - u)/2; p = Prepend[p, 0]};, %t A358432 {uu = (u - 1 + v)/2; vv = (v + 1 - u)/2; p = Prepend[p, 1]} %t A358432 ]; u = uu; v = vv; %t A358432 ]; w = u + v*I; q = MemberQ[W, w]; L = Length[p]; %t A358432 If[q == True, pp[x_] := Sum[p[[k]]*x^(L - k), {k, 1, L}], %t A358432 pp[x_] := "No writing"] ; {w, pp[1 + I], pp[T]}] %o A358432 (PARI) is(n)= while (n, if (n==I, return (0), real(n)%2==imag(n)%2, n = n/(1+I), n = (n-1)/(1+I));); return (1); \\ _Rémy Sigrist_, Nov 16 2022 %Y A358432 Cf. A290884. %K A358432 nonn %O A358432 1,3 %A A358432 _Eugen Ionascu_, Nov 15 2022 %E A358432 More terms from _Charles R Greathouse IV_, Nov 15 2022