A038451 Sums of 9 distinct powers of 10.
111111111, 1011111111, 1101111111, 1110111111, 1111011111, 1111101111, 1111110111, 1111111011, 1111111101, 1111111110, 10011111111, 10101111111, 10110111111, 10111011111, 10111101111, 10111110111, 10111111011
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Sort[Plus @@@ Subsets[10^Range[0, 10], {9}]] (* Amiram Eldar, Jul 12 2022 *)
-
Python
from itertools import islice def A038451_gen(): # generator of terms yield int(bin(n:=511)[2:]) while True: yield int(bin((n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b))[2:]) A038451_list = list(islice(A038451_gen(),20)) # Chai Wah Wu, Mar 11 2025
Extensions
Offset corrected by Amiram Eldar, Jul 12 2022
Comments