A038489 Sums of 4 distinct powers of 9.
820, 6652, 7300, 7372, 7380, 59140, 59788, 59860, 59868, 65620, 65692, 65700, 66340, 66348, 66420, 531532, 532180, 532252, 532260, 538012, 538084, 538092, 538732, 538740, 538812, 590500, 590572, 590580, 591220, 591228, 591300, 597052, 597060, 597132, 597780, 4783060
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Sort[Plus @@@ Subsets[9^Range[0, 6], {4}]] (* Amiram Eldar, Jul 14 2022 *)
-
Python
from itertools import islice def A038489_gen(): # generator of terms yield int(bin(n:=15)[2:],9) 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:],9) A038489_list = list(islice(A038489_gen(),30)) # Chai Wah Wu, Apr 05 2025
Extensions
Offset corrected by Amiram Eldar, Jul 14 2022