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 A363408 #15 Jun 11 2023 14:17:14 %S A363408 0,1,4,9,36,81,121,256,324,361,729,841,1089,2304,2916,3025,3249,6561, %T A363408 6889,7569,9801,20449,20736,26244,26569,27225,29241,59049,60025,62001, %U A363408 68121,68644,88209,177241,184041,186624,203401,236196,237169,239121,245025,263169,531441,534361,540225,558009 %N A363408 Squares whose base-3 expansion has no 2. %C A363408 Squares that are the sum of distinct powers of 3. %C A363408 If k is a term, then so is 9*k. %C A363408 The only square whose base-3 expansion has no 1 is 0. %H A363408 Robert Israel, <a href="/A363408/b363408.txt">Table of n, a(n) for n = 1..665</a> %F A363408 a(n) = A176189(n-1)^2 for n>=2. - _Alois P. Heinz_, Jun 07 2023 %e A363408 a(5) = 36 is a term because 36 = 6^2 = 3^2 + 3^3. %p A363408 R:= {0,1}; %p A363408 S:= {1}; %p A363408 for i from 1 to 20 do %p A363408 S:= map(t -> (3*t, 3*t+1), S); %p A363408 R:= R union select(issqr,S) %p A363408 od: %p A363408 R; %t A363408 Select[Range[0, 1000]^2, ! MemberQ[IntegerDigits[#, 3], 2] &] (* _Amiram Eldar_, Jun 01 2023 *) %o A363408 (Python) %o A363408 from gmpy2 import digits %o A363408 def okA176189(n): return "2" not in digits(n*n, 3) %o A363408 print([k**2 for k in range(1000) if okA176189(k)]) # _Michael S. Branicky_, Jun 07 2023 %Y A363408 Intersection of A000290 and A005836. Cf. A363428. %Y A363408 Cf. A176189. %K A363408 nonn,base %O A363408 1,3 %A A363408 _Robert Israel_, May 31 2023