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 A038466 #12 Apr 04 2025 11:45:51 %S A038466 40,94,112,118,120,256,274,280,282,328,334,336,352,354,360,742,760, %T A038466 766,768,814,820,822,838,840,846,976,982,984,1000,1002,1008,1054,1056, %U A038466 1062,1080,2200,2218,2224,2226,2272,2278,2280,2296,2298,2304,2434,2440,2442,2458 %N A038466 Sums of 4 distinct powers of 3. %H A038466 Amiram Eldar, <a href="/A038466/b038466.txt">Table of n, a(n) for n = 1..10000</a> %t A038466 Sort[Plus @@@ Subsets[3^Range[0, 7], {4}]] (* _Amiram Eldar_, Jul 13 2022 *) %o A038466 (Python) %o A038466 from itertools import islice %o A038466 def A038466_gen(): # generator of terms %o A038466 yield int(bin(n:=15)[2:],3) %o A038466 while True: yield int(bin((n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b))[2:],3) %o A038466 A038466_list = list(islice(A038466_gen(),30)) # _Chai Wah Wu_, Apr 04 2025 %Y A038466 Base 3 interpretation of A038446. %Y A038466 Cf. A000244, A038464, A038465, A038467, A038468, A038469. %K A038466 nonn,easy %O A038466 1,1 %A A038466 _Olivier Gérard_ %E A038466 Offset corrected by _Amiram Eldar_, Jul 13 2022