A038445 Sums of 3 distinct powers of 10.
111, 1011, 1101, 1110, 10011, 10101, 10110, 11001, 11010, 11100, 100011, 100101, 100110, 101001, 101010, 101100, 110001, 110010, 110100, 111000, 1000011, 1000101, 1000110, 1001001, 1001010, 1001100, 1010001, 1010010, 1010100, 1011000, 1100001, 1100010, 1100100
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Sort[Plus @@@ Subsets[10^Range[0, 6], {3}]] (* Amiram Eldar, Jul 12 2022 *)
-
Python
from math import isqrt, comb from sympy import integer_nthroot def A038445(n): return 10**((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))+10**((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))+10**(m+t+1) # Chai Wah Wu, Mar 10 2025