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!)
A038470 Sums of 2 distinct powers of 4. 6
5, 17, 20, 65, 68, 80, 257, 260, 272, 320, 1025, 1028, 1040, 1088, 1280, 4097, 4100, 4112, 4160, 4352, 5120, 16385, 16388, 16400, 16448, 16640, 17408, 20480, 65537, 65540, 65552, 65600, 65792, 66560, 69632, 81920, 262145, 262148, 262160, 262208, 262400, 263168 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Sort[Plus @@@ Subsets[4^Range[0, 9], {2}]] (* Amiram Eldar, Jul 13 2022 *)
PROG
(Python)
def aupto(limit):
p = [4**i for i in range(limit//4+1) if 4**i < limit]
p2 = set(a+b for i, a in enumerate(p) for b in p[i+1:] if a+b <= limit)
return sorted(p2)
print(aupto(265000)) # Michael S. Branicky, May 17 2021
CROSSREFS
Base-4 interpretation of A038444.
Sequence in context: A045119 A045095 A061940 * A043003 A246329 A351176
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Offset corrected by Amiram Eldar, Jul 13 2022
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 August 20 22:37 EDT 2024. Contains 375340 sequences. (Running on oeis4.)