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.

A038471 Sums of 3 distinct powers of 4.

Original entry on oeis.org

21, 69, 81, 84, 261, 273, 276, 321, 324, 336, 1029, 1041, 1044, 1089, 1092, 1104, 1281, 1284, 1296, 1344, 4101, 4113, 4116, 4161, 4164, 4176, 4353, 4356, 4368, 4416, 5121, 5124, 5136, 5184, 5376, 16389, 16401, 16404, 16449, 16452, 16464, 16641, 16644, 16656, 16704
Offset: 1

Views

Author

Keywords

Crossrefs

Base 4 interpretation of A038445.

Programs

  • Mathematica
    Union[Total/@Subsets[4^Range[0,10],{3}]] (* Harvey P. Dale, Oct 20 2012 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A038471(n): return (1<<((r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2)<<1))+(1<<((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1)<<1))+(1<<(m+t+1<<1)) # Chai Wah Wu, Apr 04 2025

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022