login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055259 Sums of two powers of 8. 5
2, 9, 16, 65, 72, 128, 513, 520, 576, 1024, 4097, 4104, 4160, 4608, 8192, 32769, 32776, 32832, 33280, 36864, 65536, 262145, 262152, 262208, 262656, 266240, 294912, 524288, 2097153, 2097160, 2097216, 2097664, 2101248, 2129920, 2359296, 4194304, 16777217 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = 8^(n-trinv(n))+8^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 8^n + 8^k, so as a sequence a(n) = 8^A002262(n) + 8^A003056(n).
MATHEMATICA
Union[Total/@Tuples[8^Range[0, 10], {2}]] (* Harvey P. Dale, Mar 13 2011 *)
PROG
(Python)
def valuation(n, b):
v = 0
while n > 1: n //= b; v += 1
return v
def aupto(lim):
pows8 = [8**i for i in range(valuation(lim-1, 8) + 1)]
sum_pows8 = sorted([a+b for i, a in enumerate(pows8) for b in pows8[i:]])
return [s for s in sum_pows8 if s <= lim]
print(aupto(16777217)) # Michael S. Branicky, Feb 09 2021
CROSSREFS
Cf. A052216.
Sequence in context: A304974 A075645 A185252 * A032299 A032211 A032136
KEYWORD
easy,nonn,tabl
AUTHOR
Henry Bottomley, Jun 22 2000
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 13:38 EDT 2024. Contains 371914 sequences. (Running on oeis4.)