OFFSET
0,1
LINKS
T. D. Noe, Rows n = 0..100 of triangle, flattened
FORMULA
MATHEMATICA
t = 9^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
Total/@Tuples[9^Range[0, 10], 2]//Union (* Harvey P. Dale, Jul 03 2019 *)
PROG
(Python)
def valuation(n, b):
v = 0
while n > 1: n //= b; v += 1
return v
def aupto(lim):
pows = [9**i for i in range(valuation(lim-1, 9) + 1)]
sum_pows = sorted([a+b for i, a in enumerate(pows) for b in pows[i:]])
return [s for s in sum_pows if s <= lim]
print(aupto(43046722)) # Michael S. Branicky, Feb 10 2021
CROSSREFS
KEYWORD
AUTHOR
Henry Bottomley, Jun 22 2000
STATUS
approved