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 A033054 #21 Jul 23 2025 05:45:20 %S A033054 1,2,4,7,12,13,14,21,22,23,37,40,43,64,67,70,111,112,113,120,121,122, %T A033054 129,130,131,192,193,194,201,202,203,210,211,212,334,337,340,361,364, %U A033054 367,388,391,394,577,580,583,604,607,610,631 %N A033054 Numbers whose base-3 representation Sum_{i=0..m} d(i)*3^i has d(i)=1 for m-i odd. %H A033054 Robert Israel, <a href="/A033054/b033054.txt">Table of n, a(n) for n = 1..10000</a> %F A033054 From _Robert Israel_, Jun 06 2016: (Start) %F A033054 a(3n+3) = 9a(n)+4. %F A033054 If A110654(n) is in A132141 then a(3n+2) = 9a(n)+3 and a(3n+4) = 9a(n)+5 %F A033054 otherwise a(3n+2) = 9a(n)+1 and a(3n+4) = 9a(n)+7. %F A033054 G.f. satisfies g(x) = 9(x^2+x^3+x^4)g(x^3) + (x+2x^2+4x^3+6x^4-x^5)/(1-x^3) + ((2+2x)/(x+x^2+x^3)) Sum_{k>=1}(x^(2*3^k)-x^(4*3^k)). %F A033054 (End) %p A033054 N:= 1000: # to get a(1) to a(N) %p A033054 K:= ceil((N-4)/3): %p A033054 Dmax:= ilog[3](ceil(K/2+1)): %p A033054 A:= Vector(3*K+4): %p A033054 A[1..4]:= <1,2,4,7>: %p A033054 for d from 0 to Dmax do %p A033054 for k from 2*3^d-1 to min(4*3^d-2,K) do %p A033054 A[3*k+2]:= 9*A[k]+3; %p A033054 A[3*k+3]:= 9*A[k]+4; %p A033054 A[3*k+4]:= 9*A[k]+5 %p A033054 od: %p A033054 for k from 4*3^d-1 to min(2*3^(d+1)-2,K) do %p A033054 A[3*k+2]:= 9*A[k]+1; %p A033054 A[3*k+3]:= 9*A[k]+4; %p A033054 A[3*k+4]:= 9*A[k]+7 %p A033054 od: %p A033054 od: %p A033054 seq(A[i],i=1..N); # _Robert Israel_, Jun 06 2016 %Y A033054 Disjoint with A032953 if more than 1 digit. %K A033054 nonn,base %O A033054 1,2 %A A033054 _Clark Kimberling_ %E A033054 Name corrected by _Robert Israel_, Jun 06 2016