A038449 Sums of 7 distinct powers of 10.
1111111, 10111111, 11011111, 11101111, 11110111, 11111011, 11111101, 11111110, 100111111, 101011111, 101101111, 101110111, 101111011, 101111101, 101111110, 110011111, 110101111, 110110111, 110111011, 110111101, 110111110, 111001111, 111010111, 111011011, 111011101
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Take[Total/@Subsets[10^Range[0,20],{7}]//Union,20] (* Harvey P. Dale, Feb 25 2018 *)
-
Python
from itertools import islice def A038449_gen(): # generator of terms yield int(bin(n:=127)[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:]) A038449_list = list(islice(A038449_gen(),20)) # Chai Wah Wu, Mar 11 2025
Extensions
Offset corrected by Amiram Eldar, Jul 12 2022