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.

A038464 Sums of 2 distinct powers of 3.

Original entry on oeis.org

4, 10, 12, 28, 30, 36, 82, 84, 90, 108, 244, 246, 252, 270, 324, 730, 732, 738, 756, 810, 972, 2188, 2190, 2196, 2214, 2268, 2430, 2916, 6562, 6564, 6570, 6588, 6642, 6804, 7290, 8748, 19684, 19686, 19692, 19710, 19764, 19926, 20412, 21870, 26244, 59050, 59052
Offset: 1

Views

Author

Keywords

Crossrefs

Base-3 interpretation of A038444.

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[3^Range[0, 10], {2}]] (* Amiram Eldar, Jul 13 2022 *)
  • Python
    from math import isqrt
    def A038464(n): return 3**(m:=isqrt(n<<3)+1>>1)+3**(n-1-(m*(m-1)>>1)) # Chai Wah Wu, Apr 05 2025

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022