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.

A038493 Sums of 3 distinct powers of 12.

Original entry on oeis.org

157, 1741, 1873, 1884, 20749, 20881, 20892, 22465, 22476, 22608, 248845, 248977, 248988, 250561, 250572, 250704, 269569, 269580, 269712, 271296, 2985997, 2986129, 2986140, 2987713, 2987724, 2987856, 3006721, 3006732, 3006864, 3008448, 3234817, 3234828, 3234960
Offset: 1

Views

Author

Keywords

Crossrefs

Base-12 interpretation of A038445.

Programs

  • Mathematica
    Union[Total/@Subsets[12^Range[0,6],{3}]] (* Harvey P. Dale, Sep 06 2012 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A038493(n): return 12**((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))+12**((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))+12**(m+t+1) # Chai Wah Wu, Apr 04 2025

Extensions

Offset corrected by Amiram Eldar, Jul 14 2022