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.

A038466 Sums of 4 distinct powers of 3.

Original entry on oeis.org

40, 94, 112, 118, 120, 256, 274, 280, 282, 328, 334, 336, 352, 354, 360, 742, 760, 766, 768, 814, 820, 822, 838, 840, 846, 976, 982, 984, 1000, 1002, 1008, 1054, 1056, 1062, 1080, 2200, 2218, 2224, 2226, 2272, 2278, 2280, 2296, 2298, 2304, 2434, 2440, 2442, 2458
Offset: 1

Views

Author

Keywords

Crossrefs

Base 3 interpretation of A038446.

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[3^Range[0, 7], {4}]] (* Amiram Eldar, Jul 13 2022 *)
  • Python
    from itertools import islice
    def A038466_gen(): # generator of terms
        yield int(bin(n:=15)[2:],3)
        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)
    A038466_list = list(islice(A038466_gen(),30)) # Chai Wah Wu, Apr 04 2025

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022