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.

This page as a plain text file.
%I A038493 #17 Apr 04 2025 14:36:28
%S A038493 157,1741,1873,1884,20749,20881,20892,22465,22476,22608,248845,248977,
%T A038493 248988,250561,250572,250704,269569,269580,269712,271296,2985997,
%U A038493 2986129,2986140,2987713,2987724,2987856,3006721,3006732,3006864,3008448,3234817,3234828,3234960
%N A038493 Sums of 3 distinct powers of 12.
%H A038493 Amiram Eldar, <a href="/A038493/b038493.txt">Table of n, a(n) for n = 1..10000</a>
%t A038493 Union[Total/@Subsets[12^Range[0,6],{3}]] (* _Harvey P. Dale_, Sep 06 2012 *)
%o A038493 (Python)
%o A038493 from math import isqrt, comb
%o A038493 from sympy import integer_nthroot
%o A038493 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
%Y A038493 Base-12 interpretation of A038445.
%Y A038493 Cf. A001021, A038492.
%K A038493 nonn,easy
%O A038493 1,1
%A A038493 _Olivier Gérard_
%E A038493 Offset corrected by _Amiram Eldar_, Jul 14 2022